api client refactor
This commit is contained in:
8
apps/website/lib/services/payments/WalletService.ts
Normal file
8
apps/website/lib/services/payments/WalletService.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { api as api } from '../../api';
|
||||
import { presentWallet } from '../../presenters';
|
||||
import { WalletViewModel } from '../../view-models';
|
||||
|
||||
export async function getWallet(driverId: string): Promise<WalletViewModel> {
|
||||
const dto = await api.payments.getWallet(driverId);
|
||||
return presentWallet(dto);
|
||||
}
|
||||
Reference in New Issue
Block a user