updated
This commit is contained in:
@@ -4,7 +4,8 @@ export const createAisleApi = async (
|
||||
aisleUuid: string,
|
||||
points: any,
|
||||
type: Object,
|
||||
projectId: string
|
||||
projectId: string,
|
||||
versionId: string,
|
||||
) => {
|
||||
try {
|
||||
const response = await fetch(`${url_Backend_dwinzo}/api/V1/UpsertAisle`, {
|
||||
@@ -15,7 +16,7 @@ export const createAisleApi = async (
|
||||
token: localStorage.getItem("token") || "", // Coerce null to empty string
|
||||
refresh_token: localStorage.getItem("refreshToken") || "",
|
||||
},
|
||||
body: JSON.stringify({ aisleUuid, points, type, projectId }),
|
||||
body: JSON.stringify({ aisleUuid, points, type, projectId, versionId }),
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
@@ -27,9 +28,9 @@ export const createAisleApi = async (
|
||||
return result;
|
||||
} catch (error) {
|
||||
if (error instanceof Error) {
|
||||
throw new Error(error.message);
|
||||
console.log(error.message);
|
||||
} else {
|
||||
throw new Error("An unknown error occurred");
|
||||
console.log("An unknown error occurred");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user