add storage management features including update functionality and storage listing page

This commit is contained in:
2026-05-27 22:20:12 +02:00
parent 96488a3137
commit b0731b22db
10 changed files with 252 additions and 13 deletions
@@ -35,3 +35,16 @@ export const newStorage = async (name, description) => {
return { code: "es002" };
}
};
export const updateStorage = async (uuid, values) => {
const [result] = await pool.query(
"UPDATE storage_locations SET name = ?, description = ? WHERE uuid = UUID_TO_BIN(?);",
[values.name, values.description, uuid],
);
if (result.affectedRows > 0) {
return { code: "ss003" };
} else {
return { code: "es003" };
}
};