feat: complete cmpp platform phases 0-5
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
import { createParamDecorator, ExecutionContext } from '@nestjs/common';
|
||||
|
||||
export const TenantId = createParamDecorator((_: unknown, context: ExecutionContext) => {
|
||||
const request = context.switchToHttp().getRequest<{ header(name: string): string | undefined }>();
|
||||
const value = request.header('x-tenant-id');
|
||||
return value && value.trim().length > 0 ? value.trim() : undefined;
|
||||
});
|
||||
Reference in New Issue
Block a user