transactions

This commit is contained in:
hamid zarghami
2025-12-14 14:14:52 +03:30
parent 8e49baab30
commit 1797063f34
6 changed files with 400 additions and 33 deletions
@@ -1,5 +1,9 @@
import { api } from "@/config/axios";
import { CouponsResponse, WalletResponse } from "../types/Types";
import {
CouponsResponse,
WalletResponse,
TransactionsResponse,
} from "../types/Types";
export const getMyCoupons = async (): Promise<CouponsResponse> => {
const { data } = await api.get<CouponsResponse>("/public/coupons/me");
@@ -15,3 +19,8 @@ export const convertScoreToWallet = async () => {
const { data } = await api.post("/public/user/convert-score-to-wallet");
return data;
};
export const getTransactions = async (): Promise<TransactionsResponse> => {
const { data } = await api.get<TransactionsResponse>("/public/payments");
return data;
};