Integrate FavoriteProperty API: add/remove/get favorites with real backend
All checks were successful
Build frontend / build (push) Successful in 42s
All checks were successful
Build frontend / build (push) Successful in 42s
This commit is contained in:
@ -352,3 +352,17 @@ export function isEmail(value) {
|
||||
export function isPhoneNumber(value) {
|
||||
return /^\+?\d{7,15}$/.test(value.replace(/[\s\-()]/g, ''));
|
||||
}
|
||||
|
||||
// ─── Favorites ───
|
||||
|
||||
export async function getUserFavoriteProperties() {
|
||||
return apiFetch('/FavoriteProperty/GetUserFavoriteProperties');
|
||||
}
|
||||
|
||||
export async function addFavoriteProperty(propId) {
|
||||
return apiFetch(`/FavoriteProperty/Add?propId=${propId}`, { method: 'POST' });
|
||||
}
|
||||
|
||||
export async function removeFavoriteProperty(favePropId) {
|
||||
return apiFetch(`/FavoriteProperty/Remove?favePropId=${favePropId}`, { method: 'DELETE' });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user