Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions public/js/dashboard/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The URL should not be absolute but relative. In this case it should be ../../api/users/.

let data = {
username: $('input[name=\'username\']').val(),
email: $('input[name=\'email\']').val(),
Expand All @@ -23,4 +23,4 @@ function editUser() {
setTimeout(function () {
blockEdit = false;
}, 2000);
}
}