Owner properties page fetches from API via GetMyRentListings
All checks were successful
Build frontend / build (push) Successful in 41s

- Calls /RentProperties/GetMyRentListings/{userId} with user ID from JWT
- Maps API response (nested propertyInformation + detailsJSON) to UI format
- Removed mock data and localStorage fallback
This commit is contained in:
Claw AI
2026-03-29 22:17:49 +00:00
parent 6245965c1c
commit 0c3b454015
2 changed files with 64 additions and 49 deletions

View File

@ -177,6 +177,11 @@ 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 addRentProperty(data) {
console.log('[API] Adding rent property:', data.PropertyInformation?.Address);
return apiFetch('/RentProperties/AddRentProperty', {