balance
This commit is contained in:
@@ -14,7 +14,7 @@ export class WalletService {
|
|||||||
constructor(
|
constructor(
|
||||||
private readonly walletTransactionRepository: WalletTransactionRepository,
|
private readonly walletTransactionRepository: WalletTransactionRepository,
|
||||||
private readonly pointTransactionRepository: PointTransactionRepository,
|
private readonly pointTransactionRepository: PointTransactionRepository,
|
||||||
) { }
|
) {}
|
||||||
|
|
||||||
async getUserWalletTransactions(
|
async getUserWalletTransactions(
|
||||||
userId: string,
|
userId: string,
|
||||||
@@ -172,10 +172,12 @@ export class WalletService {
|
|||||||
return transaction;
|
return transaction;
|
||||||
}
|
}
|
||||||
|
|
||||||
getUserCurrentWalletBalance(userId: string, restuarantId: string) {
|
async getUserCurrentWalletBalance(userId: string, restuarantId: string) {
|
||||||
return this.walletTransactionRepository.getCurrentWalletBalance(userId, restuarantId)
|
const balance = await this.walletTransactionRepository.getCurrentWalletBalance(userId, restuarantId);
|
||||||
|
return { balance };
|
||||||
}
|
}
|
||||||
getUserCurrentPoinrBalance(userId: string, restuarantId: string) {
|
async getUserCurrentPoinrBalance(userId: string, restuarantId: string) {
|
||||||
return this.pointTransactionRepository.getcurrentPointBalance(userId, restuarantId)
|
const balance = await this.pointTransactionRepository.getcurrentPointBalance(userId, restuarantId);
|
||||||
|
return { balance };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export class UserWalletsSeeder {
|
|||||||
user,
|
user,
|
||||||
restaurant,
|
restaurant,
|
||||||
balance: 150000000,
|
balance: 150000000,
|
||||||
amount: 1250,
|
amount: 150000000,
|
||||||
type: WalletTransactionType.CREDIT,
|
type: WalletTransactionType.CREDIT,
|
||||||
reason: WalletTransactionReason.DEPOSIT,
|
reason: WalletTransactionReason.DEPOSIT,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user