import { Body, Controller, Get, Post, Query, UseGuards } from '@nestjs/common';
import { InternalAccessGuard } from '../common/internal-access.guard';
import { AiService } from './ai.service';
@Controller('ai')
export class AiController {
  constructor(private readonly service: AiService) {}
  @UseGuards(InternalAccessGuard)
  @Post('analyze') analyze(@Body() body: { projectId?: string }) { return this.service.analyze(body?.projectId); }
  @Get('insights') recent(@Query('projectId') projectId?: string) { return this.service.recent(projectId); }
}
