authentication authorization
This commit is contained in:
18
apps/api/src/domain/policy/PolicyController.ts
Normal file
18
apps/api/src/domain/policy/PolicyController.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { Controller, Get } from '@nestjs/common';
|
||||
import { Public } from '../auth/Public';
|
||||
import { ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger';
|
||||
import { PolicyService, PolicySnapshot } from './PolicyService';
|
||||
|
||||
@ApiTags('policy')
|
||||
@Public()
|
||||
@Controller('policy')
|
||||
export class PolicyController {
|
||||
constructor(private readonly policyService: PolicyService) {}
|
||||
|
||||
@Get('snapshot')
|
||||
@ApiOperation({ summary: 'Get current feature availability policy snapshot (read-only)' })
|
||||
@ApiResponse({ status: 200, description: 'Policy snapshot', type: Object })
|
||||
async getSnapshot(): Promise<PolicySnapshot> {
|
||||
return await this.policyService.getSnapshot();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user