mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-08-25 05:42:27 +00:00
feat: fix update card status webhook
This commit is contained in:
@ -55,7 +55,7 @@ export class CardService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async updateCardStatus(body: AccountCardStatusChangedWebhookRequest) {
|
async updateCardStatus(body: AccountCardStatusChangedWebhookRequest) {
|
||||||
const card = await this.getCardByReferenceNumber(body.cardId);
|
const card = await this.getCardByAccountNumber(body.cardId);
|
||||||
const { description, status } = CardStatusMapper[body.newStatus] || CardStatusMapper['99'];
|
const { description, status } = CardStatusMapper[body.newStatus] || CardStatusMapper['99'];
|
||||||
|
|
||||||
return this.cardRepository.updateCardStatus(card.id, status, description);
|
return this.cardRepository.updateCardStatus(card.id, status, description);
|
||||||
|
Reference in New Issue
Block a user