feat: add vpan to card entity

This commit is contained in:
Abdalhamid Alhamad
2025-08-03 11:53:16 +03:00
parent 5e0a4e6bd1
commit fce720237f
7 changed files with 41 additions and 9 deletions

View File

@ -1,5 +1,6 @@
import { Body, Controller, Post } from '@nestjs/common';
import { ApiTags } from '@nestjs/swagger';
import { ResponseFactory } from '~/core/utils';
import {
AccountCardStatusChangedWebhookRequest,
AccountTransactionWebhookRequest,
@ -14,16 +15,19 @@ export class NeoLeapWebhooksController {
@Post('card-transaction')
async handleCardTransactionWebhook(@Body() body: CardTransactionWebhookRequest) {
return this.neoleapWebhookService.handleCardTransactionWebhook(body);
await this.neoleapWebhookService.handleCardTransactionWebhook(body);
return ResponseFactory.data({ message: 'Card transaction processed successfully', status: 'success' });
}
@Post('account-transaction')
async handleAccountTransactionWebhook(@Body() body: AccountTransactionWebhookRequest) {
return this.neoleapWebhookService.handleAccountTransactionWebhook(body);
await this.neoleapWebhookService.handleAccountTransactionWebhook(body);
return ResponseFactory.data({ message: 'Account transaction processed successfully', status: 'success' });
}
@Post('account-card-status-changed')
async handleAccountCardStatusChangedWebhook(@Body() body: AccountCardStatusChangedWebhookRequest) {
return this.neoleapWebhookService.handleAccountCardStatusChangedWebhook(body);
await this.neoleapWebhookService.handleAccountCardStatusChangedWebhook(body);
return ResponseFactory.data({ message: 'Card status updated successfully', status: 'success' });
}
}