Skip to content

SudoSOS Back-end API / internal/middleware / BuildTarget

Type Alias: BuildTarget<T> ​

ts
type BuildTarget<T> = (req) => T;

Builds the validation target from the request. When provided, the middleware calls this instead of using raw req.body, allowing specs that need route params, token data, or other request context.

Type Parameters ​

Type ParameterDefault type
Tany

Parameters ​

ParameterType
reqRequestWithToken

Returns ​

T