add Middleware + fixed all pages and fixed add propertise
This commit is contained in:
@ -345,9 +345,10 @@ export async function editSaleProperty(id, data) {
|
||||
}
|
||||
|
||||
export async function addSaleProperty(data) {
|
||||
|
||||
return apiFetch("/SaleProperties/AddSaleProperty", {
|
||||
method: "POST",
|
||||
body: data,
|
||||
body: data ,
|
||||
});
|
||||
}
|
||||
|
||||
@ -446,7 +447,7 @@ async function multipartAuthFetch(endpoint, formData) {
|
||||
};
|
||||
}
|
||||
|
||||
export async function addOwner(data, frontImage = null, backImage = null) {
|
||||
export async function addOwner(data, frontImage = null, backImage = null, licenseImage = null) {
|
||||
const formData = new FormData();
|
||||
|
||||
formData.append("FirstName", data.firstName || data.FirstName || "");
|
||||
@ -467,6 +468,7 @@ export async function addOwner(data, frontImage = null, backImage = null) {
|
||||
|
||||
if (frontImage) formData.append("FrontIdCarImagePath", frontImage);
|
||||
if (backImage) formData.append("RearIdCarImagePath", backImage);
|
||||
if (licenseImage) formData.append("RearIdCarImagePath", licenseImage);
|
||||
return multipartAuthFetch("/Owner/Add", formData);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user