This commit is contained in:
2025-06-23 09:37:53 +05:30
parent 2fbdf8ab61
commit 54b02541c1
278 changed files with 10134 additions and 7904 deletions

View File

@@ -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");
}
}
};