Merge branch 'main-dev' into dev-refactor
This commit is contained in:
@@ -19,7 +19,7 @@ export const createProject = async (projectUuid: string, userId: string, thumbna
|
||||
localStorage.setItem("token", newAccessToken);
|
||||
}
|
||||
if (!response.ok) {
|
||||
throw new Error("Failed to add project");
|
||||
console.error("Failed to add project");
|
||||
}
|
||||
|
||||
const result = await response.json();
|
||||
|
||||
@@ -28,7 +28,7 @@ export const deleteProject = async (
|
||||
}
|
||||
console.log("response: ", response);
|
||||
if (!response.ok) {
|
||||
throw new Error("Failed to clearPanel in the zone");
|
||||
console.error("Failed to clearPanel in the zone");
|
||||
}
|
||||
|
||||
const result = await response.json();
|
||||
|
||||
@@ -23,13 +23,13 @@ export const deleteTrash = async (organization: string, projectId: string) => {
|
||||
console.log("restore: ", response);
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error("Failed to fetch trash data");
|
||||
console.error("Failed to fetch trash data");
|
||||
}
|
||||
|
||||
const data = await response.json();
|
||||
return data;
|
||||
} catch (error: any) {
|
||||
console.error("Failed to fetch trash data:", error);
|
||||
throw new Error(error.message || "Unknown error");
|
||||
console.error(error.message || "Unknown error");
|
||||
}
|
||||
};
|
||||
|
||||
@@ -26,7 +26,7 @@ export const duplicateProject = async (
|
||||
}
|
||||
// console.log("response: ", response);
|
||||
if (!response.ok) {
|
||||
throw new Error("Failed to add project");
|
||||
console.error("Failed to add project");
|
||||
}
|
||||
|
||||
const result = await response.json();
|
||||
|
||||
@@ -22,13 +22,13 @@ export const getTrash = async (organization: string) => {
|
||||
localStorage.setItem("token", newAccessToken);
|
||||
}
|
||||
if (!response.ok) {
|
||||
throw new Error("Failed to fetch trash data");
|
||||
console.error("Failed to fetch trash data");
|
||||
}
|
||||
|
||||
const data = await response.json();
|
||||
return data;
|
||||
} catch (error: any) {
|
||||
console.error("Failed to fetch trash data:", error);
|
||||
throw new Error(error.message || "Unknown error");
|
||||
console.error(error.message || "Unknown error");
|
||||
}
|
||||
};
|
||||
|
||||
@@ -19,7 +19,7 @@ export const projectTutorial = async () => {
|
||||
// console.log("response: ", response);
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error("Failed to add project");
|
||||
console.error("Failed to add project");
|
||||
}
|
||||
|
||||
const result = await response.json();
|
||||
|
||||
@@ -20,7 +20,7 @@ export const recentlyViewed = async (organization: string, userId: string) => {
|
||||
localStorage.setItem("token", newAccessToken);
|
||||
}
|
||||
if (!response.ok) {
|
||||
throw new Error("Failed to fetch project");
|
||||
console.error("Failed to fetch project");
|
||||
}
|
||||
|
||||
return await response.json();
|
||||
|
||||
@@ -22,7 +22,7 @@ export const restoreTrash = async (organization: string, projectId: string) => {
|
||||
}
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error("Failed to fetch trash data");
|
||||
console.error("Failed to fetch trash data");
|
||||
}
|
||||
|
||||
const data = await response.json();
|
||||
@@ -30,6 +30,6 @@ export const restoreTrash = async (organization: string, projectId: string) => {
|
||||
return data;
|
||||
} catch (error: any) {
|
||||
console.error("Failed to fetch trash data:", error);
|
||||
throw new Error(error.message || "Unknown error");
|
||||
console.error(error.message || "Unknown error");
|
||||
}
|
||||
};
|
||||
|
||||
@@ -26,7 +26,7 @@ export const searchProject = async (
|
||||
|
||||
console.log("response: ", response);
|
||||
if (!response.ok) {
|
||||
throw new Error("Failed to Search project");
|
||||
console.error("Failed to Search project");
|
||||
}
|
||||
|
||||
const result = await response.json();
|
||||
|
||||
@@ -24,7 +24,7 @@ export const trashSearchProject = async (
|
||||
localStorage.setItem("token", newAccessToken);
|
||||
}
|
||||
if (!response.ok) {
|
||||
throw new Error("Failed to add project");
|
||||
console.error("Failed to add project");
|
||||
}
|
||||
|
||||
const result = await response.json();
|
||||
|
||||
@@ -37,7 +37,7 @@ export const updateProject = async (
|
||||
localStorage.setItem("token", newAccessToken);
|
||||
}
|
||||
if (!response.ok) {
|
||||
throw new Error("Failed to clearPanel in the zone");
|
||||
console.error("Failed to clearPanel in the zone");
|
||||
}
|
||||
|
||||
const result = await response.json();
|
||||
|
||||
@@ -25,7 +25,7 @@ export const viewProject = async (
|
||||
}
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error("Failed to fetch");
|
||||
console.error("Failed to fetch");
|
||||
}
|
||||
|
||||
return await response.json();
|
||||
|
||||
Reference in New Issue
Block a user