mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-08-26 06:09:41 +00:00
feat: add vpan to card entity
This commit is contained in:
@ -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' });
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user