chnaged port config
This commit is contained in:
@@ -172,14 +172,17 @@ export const handleEditItems = async (
|
|||||||
can_borrow_role: string
|
can_borrow_role: string
|
||||||
) => {
|
) => {
|
||||||
try {
|
try {
|
||||||
const response = await fetch("http://localhost:8002/api/updateItemByID", {
|
const response = await fetch(
|
||||||
|
"https://backend.insta.the1s.de/api/updateItemByID",
|
||||||
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
Authorization: `Bearer ${Cookies.get("token")}`,
|
Authorization: `Bearer ${Cookies.get("token")}`,
|
||||||
},
|
},
|
||||||
body: JSON.stringify({ itemId, item_name, can_borrow_role }),
|
body: JSON.stringify({ itemId, item_name, can_borrow_role }),
|
||||||
});
|
}
|
||||||
|
);
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error("Failed to edit item");
|
throw new Error("Failed to edit item");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user