Spaces:
Paused
Paused
| import { Controller, Get, UseGuards } from '@nestjs/common'; | |
| import { AdminService } from './admin.service'; | |
| import { JwtAuthGuard } from '../auth/jwt-auth.guard'; | |
| import { RolesGuard } from '../auth/guards/roles.guard'; | |
| import { Roles } from '../auth/decorators/roles.decorator'; | |
| ('admin') | |
| (JwtAuthGuard, RolesGuard) | |
| ('admin') | |
| export class AdminController { | |
| constructor(private readonly adminService: AdminService) {} | |
| ('stats/overview') | |
| getStatsOverview() { | |
| return this.adminService.getStatsOverview(); | |
| } | |
| ('events') | |
| getEventsForManagement() { | |
| return this.adminService.getEventsForManagement(); | |
| } | |
| } | |