eventnaija / src /admin /admin.controller.ts
Auspicious14's picture
feat: initialize complete EventNaija backend project
07441a7
Raw
History Blame Contribute Delete
681 Bytes
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';
@Controller('admin')
@UseGuards(JwtAuthGuard, RolesGuard)
@Roles('admin')
export class AdminController {
constructor(private readonly adminService: AdminService) {}
@Get('stats/overview')
getStatsOverview() {
return this.adminService.getStatsOverview();
}
@Get('events')
getEventsForManagement() {
return this.adminService.getEventsForManagement();
}
}