import { Body, Controller, Post } from '@nestjs/common';
import { ApiBearerAuth, ApiTags } from '@nestjs/swagger';
import { AuthUser, CurrentUser } from '../../common/current-user.decorator';
import { LampIngestionService } from './lamp-ingestion.service';

@ApiTags('路灯接入')
@ApiBearerAuth()
@Controller('lamp-ingestion')
export class LampIngestionController {
  constructor(private readonly lampIngestionService: LampIngestionService) {}

  @Post('receive')
  receive(@CurrentUser() user: AuthUser, @Body() dto: Record<string, unknown>) {
    return this.lampIngestionService.receive(user, dto);
  }
}
