fix: update GetMyRentListings endpoint (userId removed from URL)
All checks were successful
Build frontend / build (push) Successful in 1m3s
All checks were successful
Build frontend / build (push) Successful in 1m3s
This commit is contained in:
@ -721,7 +721,7 @@ export default function OwnerPropertiesPage() {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
console.log('[OwnerProperties] Fetching listings for user:', userId);
|
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] : []);
|
const list = Array.isArray(data) ? data : (data ? [data] : []);
|
||||||
console.log('[OwnerProperties] API returned:', list.length, 'properties');
|
console.log('[OwnerProperties] API returned:', list.length, 'properties');
|
||||||
|
|
||||||
|
|||||||
@ -177,9 +177,9 @@ export async function getOwnerByUserId(userId) {
|
|||||||
|
|
||||||
// ─── Properties ───
|
// ─── Properties ───
|
||||||
|
|
||||||
export async function getMyRentListings(userId) {
|
export async function getMyRentListings() {
|
||||||
console.log('[API] Fetching my rent listings for user:', userId);
|
console.log('[API] Fetching my rent listings');
|
||||||
return apiFetch(`/RentProperties/GetMyRentListings/${userId}`);
|
return apiFetch(`/RentProperties/GetMyRentListings`);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function addRentProperty(data) {
|
export async function addRentProperty(data) {
|
||||||
|
|||||||
Reference in New Issue
Block a user