Add user creation and update functionality; refactor user template and helpers

This commit is contained in:
Yaro Kasear 2025-07-07 15:36:15 -05:00
parent f4369348c5
commit 26e55b9a3e
6 changed files with 134 additions and 24 deletions

View file

@ -157,7 +157,7 @@
const id = document.querySelector("#inventoryId").value;
const isEdit = id && id !== "None";
const endpoint = isEdit ? `/api/inventory/${id}` : "/api/inventory"
const endpoint = isEdit ? `/api/inventory/${id}` : "/api/inventory";
const method = isEdit ? "PUT" : "POST";
const response = await fetch(endpoint, {