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

@ApiTags('报警接入')
@ApiBearerAuth()
@Controller('alarm-ingestion')
export class AlarmIngestionController {
  constructor(private readonly alarmIngestionService: AlarmIngestionService) {}

  @Post('receive')
  receive(@CurrentUser() user: AuthUser, @Body() dto: any) {
    return this.alarmIngestionService.receive(user, dto);
  }
}
