9 lines
275 B
TypeScript
9 lines
275 B
TypeScript
|
import { createParamDecorator, ExecutionContext } from '@nestjs/common';
|
||
|
|
||
|
export const ReqDomain = createParamDecorator(
|
||
|
(data: unknown, ctx: ExecutionContext) => {
|
||
|
const response = ctx.switchToHttp().getResponse();
|
||
|
return response.locals.domain as string;
|
||
|
},
|
||
|
);
|