feat: default domain
This commit is contained in:
parent
f958ab7af9
commit
2eebead81c
|
@ -7,7 +7,7 @@ import type { FastifyRequest } from 'fastify';
|
||||||
*/
|
*/
|
||||||
export const Domain = createParamDecorator((_, context: ExecutionContext) => {
|
export const Domain = createParamDecorator((_, context: ExecutionContext) => {
|
||||||
const request = context.switchToHttp().getRequest<FastifyRequest>();
|
const request = context.switchToHttp().getRequest<FastifyRequest>();
|
||||||
return request.headers['sk-domain'];
|
return request.headers['sk-domain'] ?? 1;
|
||||||
});
|
});
|
||||||
|
|
||||||
export type SkDomain = number;
|
export type SkDomain = number;
|
||||||
|
|
Loading…
Reference in New Issue