fully implemented delete function for storages

This commit is contained in:
2026-05-29 17:55:26 +02:00
parent 8c4f194164
commit 214941ed7a
5 changed files with 83 additions and 7 deletions
@@ -48,3 +48,16 @@ export const updateStorage = async (uuid, values) => {
return { code: "es003" };
}
};
export const deleteStorage = async (uuid) => {
const [result] = await pool.query(
"DELETE FROM storage_locations WHERE uuid = UUID_TO_BIN(?);",
[uuid],
);
if (result.affectedRows > 0) {
return { code: "ss004" };
} else {
return { code: "es004" };
}
};