From 2c4722f9a81718cbb5fa7e04fbe1a563b69c7fa9 Mon Sep 17 00:00:00 2001 From: Dogboy21 Date: Fri, 20 Apr 2018 19:09:19 +0200 Subject: [PATCH] Update user.js Fixes broken editing of users --- public/js/dashboard/user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/dashboard/user.js b/public/js/dashboard/user.js index ced4aa1..53d11d6 100644 --- a/public/js/dashboard/user.js +++ b/public/js/dashboard/user.js @@ -3,7 +3,7 @@ let blockEdit = false; function editUser() { if (blockEdit) return; blockEdit = true; - const url = '../api/users/' + searchedUser.id; + const url = '/api/users/' + searchedUser.id; let data = { username: $('input[name=\'username\']').val(), email: $('input[name=\'email\']').val(), @@ -23,4 +23,4 @@ function editUser() { setTimeout(function () { blockEdit = false; }, 2000); -} \ No newline at end of file +}