mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-08-25 05:42:27 +00:00
30 lines
1.1 KiB
TypeScript
30 lines
1.1 KiB
TypeScript
import { Body, Controller, Post } from '@nestjs/common';
|
|
import { ApiTags } from '@nestjs/swagger';
|
|
import {
|
|
AccountCardStatusChangedWebhookRequest,
|
|
AccountTransactionWebhookRequest,
|
|
CardTransactionWebhookRequest,
|
|
} from '../dtos/requests';
|
|
import { NeoLeapWebhookService } from '../services';
|
|
|
|
@Controller('neoleap-webhooks')
|
|
@ApiTags('Neoleap Webhooks')
|
|
export class NeoLeapWebhooksController {
|
|
constructor(private readonly neoleapWebhookService: NeoLeapWebhookService) {}
|
|
|
|
@Post('card-transaction')
|
|
async handleCardTransactionWebhook(@Body() body: CardTransactionWebhookRequest) {
|
|
return this.neoleapWebhookService.handleCardTransactionWebhook(body);
|
|
}
|
|
|
|
@Post('account-transaction')
|
|
async handleAccountTransactionWebhook(@Body() body: AccountTransactionWebhookRequest) {
|
|
return this.neoleapWebhookService.handleAccountTransactionWebhook(body);
|
|
}
|
|
|
|
@Post('account-card-status-changed')
|
|
async handleAccountCardStatusChangedWebhook(@Body() body: AccountCardStatusChangedWebhookRequest) {
|
|
return this.neoleapWebhookService.handleAccountCardStatusChangedWebhook(body);
|
|
}
|
|
}
|