Skip to content
This repository was archived by the owner on Jan 28, 2026. It is now read-only.

Commit b19cfde

Browse files
committed
feat: Enhance StatisticsController with versioning and bearer authentication for secure access
1 parent c6e4c02 commit b19cfde

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/statistics/statistics.controller.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Controller, Get, Version } from '@nestjs/common';
2-
import { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger';
2+
import { ApiTags, ApiOperation, ApiResponse, ApiBearerAuth } from '@nestjs/swagger';
33
import { StatisticsService } from './statistics.service';
44
import { UseGuards } from '@nestjs/common';
55
import { JwtAuthGuard } from '../auth/guards/jwt-auth.guard';
@@ -10,7 +10,9 @@ export class StatisticsController {
1010
constructor(private readonly statisticsService: StatisticsService) {}
1111

1212
@Get()
13+
@Version('1')
1314
@UseGuards(JwtAuthGuard)
15+
@ApiBearerAuth()
1416
@ApiOperation({ summary: 'Получить статистику системы' })
1517
@ApiResponse({
1618
status: 200,

0 commit comments

Comments
 (0)