basalt / fastify/src / RequestEnricher
Type Alias: RequestEnricher
> RequestEnricher = (info) => void | Promise<void>
Defined in: http/src/pipeline.ts:30
Runs inside the request context, before validation and the handler. Plugins register enrichers in the 'http:enrichers' metadata bucket — tenancy uses this to resolve and attach the current tenant.
Parameters
info
container
context
request
route?
The route being served, so an enricher can honour its meta — tenancy uses meta.tenant to tell central routes from tenant ones. Optional because enrichers written before this existed do not read it.
Returns
void | Promise<void>