From cf7f51b51479bb089afece39ffbf83024df534e8 Mon Sep 17 00:00:00 2001 From: Claw AI Date: Tue, 31 Mar 2026 18:46:12 +0000 Subject: [PATCH] fix: update GetMyRentListings endpoint (userId removed from URL) --- app/owner/properties/page.js | 2 +- app/utils/api.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/owner/properties/page.js b/app/owner/properties/page.js index cbb80d2..1e4c485 100644 --- a/app/owner/properties/page.js +++ b/app/owner/properties/page.js @@ -721,7 +721,7 @@ export default function OwnerPropertiesPage() { try { console.log('[OwnerProperties] Fetching listings for user:', userId); - const data = await getMyRentListings(userId); + const data = await getMyRentListings(); const list = Array.isArray(data) ? data : (data ? [data] : []); console.log('[OwnerProperties] API returned:', list.length, 'properties'); diff --git a/app/utils/api.js b/app/utils/api.js index 134a0fb..9051bde 100644 --- a/app/utils/api.js +++ b/app/utils/api.js @@ -177,9 +177,9 @@ export async function getOwnerByUserId(userId) { // ─── Properties ─── -export async function getMyRentListings(userId) { - console.log('[API] Fetching my rent listings for user:', userId); - return apiFetch(`/RentProperties/GetMyRentListings/${userId}`); +export async function getMyRentListings() { + console.log('[API] Fetching my rent listings'); + return apiFetch(`/RentProperties/GetMyRentListings`); } export async function addRentProperty(data) {