import { Body, Controller, Post } from '@nestjs/common'; import { ApiTags } from '@nestjs/swagger'; import { GatewayReceiptEventDto, GatewaySubmitResultDto, GatewayUplinkEventDto, SendChainService, } from './send-chain.service'; @ApiTags('gateway-events') @Controller('gateway/events') export class GatewayEventsController { constructor(private readonly sendChain: SendChainService) {} @Post('submit-result') submitResult(@Body() body: GatewaySubmitResultDto) { return this.sendChain.handleSubmitResult(body); } @Post('receipt') receipt(@Body() body: GatewayReceiptEventDto) { return this.sendChain.handleReceipt(body); } @Post('uplink') uplink(@Body() body: GatewayUplinkEventDto) { return this.sendChain.handleUplink(body); } }