import { Controller, Get, Param, UseGuards } from '@nestjs/common';
import { ApiTags, ApiOperation, ApiBearerAuth } from '@nestjs/swagger';
import { DashboardService } from './dashboard.service';
import { JwtGuard } from '../../common/jwt.guard';

@ApiTags('Dashboard')
@Controller('dashboard')
@UseGuards(JwtGuard)
@ApiBearerAuth('JWT-auth')
export class DashboardController {
  constructor(private service: DashboardService) {}
  @Get(':passengerId') @ApiOperation({ summary: 'Get home dashboard aggregate for passenger' })
  getHomeDashboard(@Param('passengerId') id: string) { return this.service.getHomeDashboard(id); }
}
