forked from amer2004/SweetHome
fixed the api url
This commit is contained in:
@ -181,8 +181,8 @@ export default function PaymentsPage() {
|
|||||||
|
|
||||||
const loadReservations = useCallback(async () => {
|
const loadReservations = useCallback(async () => {
|
||||||
try {
|
try {
|
||||||
const data = await getMyTransaction();
|
const json = await getMyTransaction();
|
||||||
const items = Array.isArray(data) ? data : [];
|
const items = Array.isArray(json) ? json : [];
|
||||||
|
|
||||||
const mapped = items.map((item) => {
|
const mapped = items.map((item) => {
|
||||||
const deposit = item?.diposit || item?.deposit || {};
|
const deposit = item?.diposit || item?.deposit || {};
|
||||||
|
|||||||
@ -374,10 +374,9 @@
|
|||||||
// // ─── Booking/Reservation Management ───
|
// // ─── Booking/Reservation Management ───
|
||||||
|
|
||||||
import AuthService from "../services/AuthService";
|
import AuthService from "../services/AuthService";
|
||||||
const API_BASE =
|
// const API_BASE =
|
||||||
process.env.NEXT_PUBLIC_API_URL || "https://45.93.137.91.nip.io/api";
|
// process.env.NEXT_PUBLIC_API_URL || "https://45.93.137.91.nip.io/api";
|
||||||
const REPORT_API_BASE =
|
const API_BASE = process.env.NEXT_PUBLIC_API_URL || "http://45.93.137.91/api";
|
||||||
process.env.NEXT_PUBLIC_REPORT_API_URL || "http://45.93.137.91/api";
|
|
||||||
|
|
||||||
function isFormData(value) {
|
function isFormData(value) {
|
||||||
return typeof FormData !== "undefined" && value instanceof FormData;
|
return typeof FormData !== "undefined" && value instanceof FormData;
|
||||||
@ -1033,9 +1032,7 @@ export async function payDeposit(data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function getMyTransaction() {
|
export async function getMyTransaction() {
|
||||||
return apiFetch("/Customer/GetMyTransaction", {
|
return apiFetch("/Customer/GetMyTransaction");
|
||||||
method: "GET",
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ─── Owner Contact & Stats ───
|
// ─── Owner Contact & Stats ───
|
||||||
|
|||||||
Reference in New Issue
Block a user