change end point wallet and score
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { api } from "@/config/axios";
|
||||
import {
|
||||
CouponsResponse,
|
||||
WalletResponse,
|
||||
WalletBalanceResponse,
|
||||
TransactionsResponse,
|
||||
} from "../types/Types";
|
||||
|
||||
@@ -10,8 +10,20 @@ export const getMyCoupons = async (): Promise<CouponsResponse> => {
|
||||
return data;
|
||||
};
|
||||
|
||||
export const getUserWallet = async (): Promise<WalletResponse> => {
|
||||
const { data } = await api.get<WalletResponse>("/public/user/wallet");
|
||||
export const getUserWalletBalance = async (): Promise<
|
||||
WalletBalanceResponse
|
||||
> => {
|
||||
const { data } = await api.get<WalletBalanceResponse>(
|
||||
"/public/user/wallet/balance"
|
||||
);
|
||||
return data;
|
||||
};
|
||||
export const getUserPointsBalance = async (): Promise<
|
||||
WalletBalanceResponse
|
||||
> => {
|
||||
const { data } = await api.get<WalletBalanceResponse>(
|
||||
"/public/user/points/balance"
|
||||
);
|
||||
return data;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user