added delete function to product table

This commit is contained in:
2026-05-29 23:04:41 +02:00
parent 6bacd1c605
commit 9cab32ddea
6 changed files with 97 additions and 8 deletions
+16
View File
@@ -273,3 +273,19 @@ export const fetchSettings = async () => {
return { success: true, data: response.data, code: response.code };
}
};
export const deleteSelectedProducts = async (uuids: string[]) => {
const result = await fetch(`${API_BASE}/products/delete-selection`, {
method: "POST",
body: JSON.stringify(uuids),
headers: {
Authorization: `Bearer ${Cookies.get("token") || ""}`,
"Content-Type": "application/json",
Accept: "application/json",
},
});
const response = await result.json();
console.log(response);
};