Type alias Middleware<Meta>

Middleware<Meta>: ((apiContext: ApiContext, meta: Meta) => Promise<boolean>)

Type Parameters

Type declaration

    • (apiContext: ApiContext, meta: Meta): Promise<boolean>
    • Middleware type to be executed immediately before endpoint execution

      Returns

      Promise which, if it resolves to false, the endpoint processing does not continue (In that case, the middleware should take care of responding to the client )

      Parameters

      • apiContext: ApiContext

        IncomingMessage from 'http'

      • meta: Meta

        ServerResponse from 'http'

      Returns Promise<boolean>

Generated using TypeDoc