import { Controller, Get, UseGuards } from '@nestjs/common'
import { JwtAuthGuard } from '../auth/jwt-auth.guard.js'
import { OperatorGuard } from '../auth/operator.guard.js'
import { UsersService } from './users.service.js'

// Platform-wide analytics for the operator reports page. Operator-only.
@Controller('reports')
@UseGuards(JwtAuthGuard, OperatorGuard)
export class PlatformReportsController {
  constructor(private readonly users: UsersService) {}

  @Get('platform')
  async platform() {
    return this.users.platformReports()
  }
}
