feat: default domain

This commit is contained in:
louis 2024-04-17 10:24:09 +08:00
parent f958ab7af9
commit 2eebead81c
1 changed files with 1 additions and 1 deletions

View File

@ -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;