This commit is contained in:
2026-07-02 20:11:44 +03:30
parent d20e5be9c8
commit 6b3327ee16
21 changed files with 262 additions and 7 deletions
@@ -0,0 +1,19 @@
import { applyDecorators } from '@nestjs/common';
import { ApiBearerAuth, ApiOperation } from '@nestjs/swagger';
import { SWAGGER_JWT_AUTH } from '../swagger.setup';
export function ApiPublicEndpoint(summary?: string) {
return applyDecorators(
ApiOperation({
summary,
security: [],
}),
);
}
export function ApiProtectedEndpoint(summary?: string) {
return applyDecorators(
ApiBearerAuth(SWAGGER_JWT_AUTH),
...(summary ? [ApiOperation({ summary })] : []),
);
}