Type aliases
CatchHandler
Type declaration
-
-
Parameters
-
-
res: NextApiResponse
-
error: any
Returns Promise<void> | void
CorsOriginHandlerResult
CorsOriginHandlerResult: string | string[]
OneHttpMethod
OneHttpMethod: keyof typeof HttpMethod
PossiblyAuthedNextApiHandler
Type declaration
-
-
Parameters
Returns Promise<void> | NextApiHandler
RestMiddlewareHandlers
RestMiddlewareHandlers: {}
UserId
UserId: string | number | null | undefined
Object key may be of type
HttpMethod
, value must be of typePossiblyAuthedNextApiHandler | NextApiHandler
{ get: (req, res) => res.send('Hello world'), post: (req, res) => res.send(`Hello ${req.body.name || 'world'}`), }