Owner properties page fetches from API via GetMyRentListings
All checks were successful
Build frontend / build (push) Successful in 41s
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:
@ -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', {
|
||||
|
||||
Reference in New Issue
Block a user