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 Parameter | Default type |
|---|---|
T | any |
Parameters ​
| Parameter | Type |
|---|---|
req | RequestWithToken |
Returns ​
T