Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ExampleController

The specific ExampleController used by the examples route handler.

Hierarchy

  • ExampleController

Index

Properties

Static collectionName

collectionName: string = "examples"

The collection's name used by this controller.

Methods

Static create

  • create(req: Request, res: Response, next: NextFunction): void
  • A static method used to parse, validate and create a new Example document.

    Parameters

    • req: Request

      The request received by the API Rest

    • res: Response

      The response sent by the API Rest

    • next: NextFunction

      The next function executed in the app's middleware

    Returns void

Static delete

  • delete(req: Request, res: Response, next: NextFunction): void
  • A static method used to delete an Example document by the given id.

    Parameters

    • req: Request

      The request received by the API Rest

    • res: Response

      The response sent by the API Rest

    • next: NextFunction

      The next function executed in the app's middleware

    Returns void

Static readAll

  • readAll(req: Request, res: Response, next: NextFunction): void
  • A static method used to read all Example documents.

    Parameters

    • req: Request

      The request received by the API Rest

    • res: Response

      The response sent by the API Rest

    • next: NextFunction

      The next function executed in the app's middleware

    Returns void

Static readOne

  • readOne(req: Request, res: Response, next: NextFunction): void
  • A static method used to read one Example document by the given id.

    Parameters

    • req: Request

      The request received by the API Rest

    • res: Response

      The response sent by the API Rest

    • next: NextFunction

      The next function executed in the app's middleware

    Returns void

Static update

  • update(req: Request, res: Response, next: NextFunction): void
  • A static method used to update certain fields of an Example document by the given id.

    Parameters

    • req: Request

      The request received by the API Rest

    • res: Response

      The response sent by the API Rest

    • next: NextFunction

      The next function executed in the app's middleware

    Returns void

Generated using TypeDoc