From e485acb06226e275af386425a56518ec67fb687f Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Fri, 3 Nov 2023 21:36:53 +0100 Subject: [PATCH] add backoffice --- web/html/adduser.html | 4 ++-- web/js/user.js | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/web/html/adduser.html b/web/html/adduser.html index ff4f429..c9a56c2 100644 --- a/web/html/adduser.html +++ b/web/html/adduser.html @@ -119,12 +119,12 @@
diff --git a/web/js/user.js b/web/js/user.js index d7a743f..c80838e 100644 --- a/web/js/user.js +++ b/web/js/user.js @@ -122,8 +122,7 @@ if(id.length > 0){ } dataPut = { - - "id": id, + "id": document.getElementById("idUpdateInput").value, "username": document.getElementById("usernameUpdateInput").value, "email": document.getElementById("emailUpdateInput").value, "name": document.getElementById("nameUpdateInput").value, @@ -140,7 +139,7 @@ if(id.length > 0){ } instance({ method : "put", - url:"users", + url:"users/"+document.getElementById("idUpdateInput").value, withCredentials: true, data: dataPut }).then(function(response){