update
This commit is contained in:
parent
27339ba1bd
commit
7103e802b0
1 changed files with 16 additions and 15 deletions
|
|
@ -1,18 +1,19 @@
|
||||||
import { ENV } from "../../config/env";
|
import { ENV } from "../../config/env";
|
||||||
|
|
||||||
export const getAllDesign = async (token: string) => {
|
export const getAllDesign = async (token: string) => {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`${ENV.CANVAS_SERVER_URL_DEV}/design`, {
|
const response = await fetch(`${ENV.CANVAS_SERVER_URL_DEV}/design`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `Bearer ${token}`,
|
Authorization: `Bearer ${token}`,
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
return data;
|
console.log(response);
|
||||||
} catch (error: any) {
|
return data;
|
||||||
console.log(error);
|
} catch (error: any) {
|
||||||
return { status: 500, message: error.message, token };
|
console.log(error);
|
||||||
}
|
return { status: 500, message: error.message, token };
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue