refactor(web): move util js functions into a separate file

This commit is contained in:
2025-01-07 15:15:04 +03:00
parent eeb4b52192
commit 3bfc54e407
5 changed files with 46 additions and 47 deletions
+1 -6
View File
@@ -31,12 +31,7 @@ $(document).on("click", "#btn-logout", function (e) {
$(document).on("submit", "#user-update", function (e) {
e.preventDefault();
formdata = $("#user-update").serializeArray();
data = {};
$(formdata).each(function (index, obj) {
data[obj.name] = obj.value;
});
console.log(data);
data = formToJSON($("#user-update"));
$.ajax({
url: "/api/auth",
type: "PATCH",