feat: show embossing information for child cards

This commit is contained in:
Abdalhameed Ahmad
2025-09-09 21:45:37 +03:00
parent cc4c8254f6
commit 872d231f72
4 changed files with 24 additions and 5 deletions

View File

@ -114,6 +114,14 @@ export class CardService {
return this.neoleapService.getEmbossingInformation(card);
}
async getChildCardEmbossingInformation(cardId: string, guardianId: string) {
const card = await this.getCardById(cardId);
if (card.parentId !== guardianId) {
throw new BadRequestException('CARD.DOES_NOT_BELONG_TO_GUARDIAN');
}
return this.neoleapService.getEmbossingInformation(card);
}
async updateCardLimit(cardId: string, newLimit: number) {
const { affected } = await this.cardRepository.updateCardLimit(cardId, newLimit);