change end point wallet and score

This commit is contained in:
hamid zarghami
2025-12-30 11:59:04 +03:30
parent ca53e15d49
commit 965af04109
5 changed files with 35 additions and 9 deletions
@@ -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;
};