DuOrigin v2 - React + NestJS + Prisma + EUDR API Integration
This commit is contained in:
19
backend/src/dashboard/dashboard.controller.ts
Normal file
19
backend/src/dashboard/dashboard.controller.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { Controller, Get, UseGuards } from '@nestjs/common';
|
||||
import { ApiTags, ApiOperation, ApiResponse, ApiBearerAuth } from '@nestjs/swagger';
|
||||
import { DashboardService } from './dashboard.service';
|
||||
import { JwtAuthGuard } from '../auth/jwt-auth.guard';
|
||||
|
||||
@ApiTags('dashboard')
|
||||
@Controller('dashboard')
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@ApiBearerAuth()
|
||||
export class DashboardController {
|
||||
constructor(private dashboardService: DashboardService) {}
|
||||
|
||||
@Get('stats')
|
||||
@ApiOperation({ summary: 'Obter estatísticas do dashboard' })
|
||||
@ApiResponse({ status: 200, description: 'Estatísticas retornadas' })
|
||||
getStats() {
|
||||
return this.dashboardService.getStats();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user