import { Body, Controller, Get, Post, Query, UseGuards } from '@nestjs/common';
import { InternalAccessGuard } from '../common/internal-access.guard';
import { ReportsService } from './reports.service';
@Controller('reports')
export class ReportsController {
  constructor(private readonly service: ReportsService) {}
  @Get('summary') summary(@Query('projectId') projectId?: string, @Query('from') from?: string, @Query('to') to?: string) { return this.service.summary(projectId, from, to); }
  @Get('jobs') jobs(@Query('projectId') projectId?: string) { return this.service.jobs(projectId); }
  @UseGuards(InternalAccessGuard)
  @Post('generate') generate(@Body() body: Record<string, unknown>) { return this.service.queue(body); }
}
