This commit is contained in:
smfahim25 2025-03-20 15:59:17 +06:00
parent 27339ba1bd
commit 7103e802b0

View file

@ -1,18 +1,19 @@
import { ENV } from "../../config/env";
export const getAllDesign = async (token: string) => {
try {
const response = await fetch(`${ENV.CANVAS_SERVER_URL_DEV}/design`, {
method: "GET",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
}
});
const data = await response.json();
return data;
} catch (error: any) {
console.log(error);
return { status: 500, message: error.message, token };
}
}
try {
const response = await fetch(`${ENV.CANVAS_SERVER_URL_DEV}/design`, {
method: "GET",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
});
const data = await response.json();
console.log(response);
return data;
} catch (error: any) {
console.log(error);
return { status: 500, message: error.message, token };
}
};