import { TeachingAnalyticsService } from './teaching-analytics.service' import { Controller, Get, Query, UseGuards } from '@nestjs/common' import { JwtAuthGuard } from '../auth/jwt-auth.guard' import { Roles } from '../auth/roles.decorator' import { RolesGuard } from '../auth/roles.guard' import { UserRole } from '@mp-pilates/shared' @Controller('admin') @UseGuards(JwtAuthGuard, RolesGuard) @Roles(UserRole.ADMIN) export class AdminController { constructor(private readonly analytics: TeachingAnalyticsService) {} @Get('teaching-analytics') getTeachingAnalytics(@Query('month') month: string) { return this.analytics.getMonthly(month) } }