Skip to content

covenix / CookieParam

Function: CookieParam()

CookieParam(name): ParameterDecorator

Defined in: src/parameters.ts:163

Injects a request cookie value as a handler argument. Resolves to the value parsed by @Cookies when present, otherwise the raw cookie. covenix reads req.cookies, so a cookie parser (e.g. cookie-parser) must run as middleware ahead of the route.

Parameters

name

string

Cookie name, e.g. 'sid'.

Returns

ParameterDecorator