Skip to main content

Class: MiddlewareStore

Since

1.0.0

Extends

Constructors

new MiddlewareStore()

new MiddlewareStore(): MiddlewareStore

Returns

MiddlewareStore

Overrides

Store<Middleware, 'middlewares'>.constructor

Source

projects/plugins/packages/api/src/lib/structures/MiddlewareStore.ts:16

Properties

sortedMiddlewares

readonly sortedMiddlewares: Middleware <MiddlewareOptions>[] = []

The sorted middlewares, in ascending order of see Middleware.position.

Source

projects/plugins/packages/api/src/lib/structures/MiddlewareStore.ts:14

Methods

clear()

clear(): void

Returns

void

Overrides

Store.clear

Source

projects/plugins/packages/api/src/lib/structures/MiddlewareStore.ts:46


delete()

delete(key: string): boolean

Parameters

ParameterType
keystring

Returns

boolean

Overrides

Store.delete

Source

projects/plugins/packages/api/src/lib/structures/MiddlewareStore.ts:37


run()

run(request: ApiRequest, response: ApiResponse<IncomingMessage>, route: null | Route <RouteOptions>): Promise<void>

Parameters

ParameterType
requestApiRequest
responseApiResponse<IncomingMessage>
routenull | Route <RouteOptions>

Returns

Promise<void>

Source

projects/plugins/packages/api/src/lib/structures/MiddlewareStore.ts:20


set()

set(key: string, value: Middleware <MiddlewareOptions>): this

Parameters

ParameterType
keystring
valueMiddleware <MiddlewareOptions>

Returns

this

Overrides

Store.set

Source

projects/plugins/packages/api/src/lib/structures/MiddlewareStore.ts:27