fixed bugs

This commit is contained in:
2025-11-23 21:39:18 +01:00
parent 4b9f55268c
commit 85e6d7fe00
5 changed files with 22 additions and 9 deletions

View File

@@ -200,7 +200,6 @@ export const handleEditItems = async (
safe_nr: string | null,
can_borrow_role: string
) => {
const newSafeNr = Number(safe_nr || 0);
try {
const response = await fetch(
`${API_BASE}/api/admin/item-data/edit-item/${itemId}`,
@@ -210,7 +209,7 @@ export const handleEditItems = async (
"Content-Type": "application/json",
Authorization: `Bearer ${Cookies.get("token")}`,
},
body: JSON.stringify({ item_name, newSafeNr, can_borrow_role }),
body: JSON.stringify({ item_name, safe_nr, can_borrow_role }),
}
);
if (!response.ok) {