From 8d3a745cc3fc6f7bce4bf281c79d24bd32ba05cb Mon Sep 17 00:00:00 2001 From: mouazkh Date: Tue, 23 Jun 2026 23:45:48 +0300 Subject: [PATCH] fixed the api url --- app/payments/page.js | 4 ++-- app/utils/api.js | 11 ++++------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/app/payments/page.js b/app/payments/page.js index 209fe63..8263160 100644 --- a/app/payments/page.js +++ b/app/payments/page.js @@ -181,8 +181,8 @@ export default function PaymentsPage() { const loadReservations = useCallback(async () => { try { - const data = await getMyTransaction(); - const items = Array.isArray(data) ? data : []; + const json = await getMyTransaction(); + const items = Array.isArray(json) ? json : []; const mapped = items.map((item) => { const deposit = item?.diposit || item?.deposit || {}; diff --git a/app/utils/api.js b/app/utils/api.js index 2ba1ac8..45bdf59 100644 --- a/app/utils/api.js +++ b/app/utils/api.js @@ -374,10 +374,9 @@ // // ─── Booking/Reservation Management ─── import AuthService from "../services/AuthService"; -const API_BASE = - process.env.NEXT_PUBLIC_API_URL || "https://45.93.137.91.nip.io/api"; -const REPORT_API_BASE = - process.env.NEXT_PUBLIC_REPORT_API_URL || "http://45.93.137.91/api"; +// const API_BASE = +// process.env.NEXT_PUBLIC_API_URL || "https://45.93.137.91.nip.io/api"; +const API_BASE = process.env.NEXT_PUBLIC_API_URL || "http://45.93.137.91/api"; function isFormData(value) { return typeof FormData !== "undefined" && value instanceof FormData; @@ -1033,9 +1032,7 @@ export async function payDeposit(data) { } export async function getMyTransaction() { - return apiFetch("/Customer/GetMyTransaction", { - method: "GET", - }); + return apiFetch("/Customer/GetMyTransaction"); } // ─── Owner Contact & Stats ───