mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-13 01:20:41 +00:00
profile to users
This commit is contained in:
@ -47,7 +47,7 @@ class PublicUserList extends RessourceList {
|
||||
return {
|
||||
'id': user.id,
|
||||
'member-since': user.member_since,
|
||||
'avatar': user.avatar ? `/profile/${user.id}/avatar` : '/static/images/user_avatar.png',
|
||||
'avatar': user.avatar ? `/users/${user.id}/avatar` : '/static/images/user_avatar.png',
|
||||
'username': user.username,
|
||||
'full-name': user.full_name ? user.full_name : '',
|
||||
'location': user.location ? user.location : '',
|
||||
@ -83,7 +83,7 @@ class PublicUserList extends RessourceList {
|
||||
let publicUserId = publicUserElement.dataset.id;
|
||||
switch (action) {
|
||||
case 'view': {
|
||||
window.location.href = `/profile/${publicUserId}`;
|
||||
window.location.href = `/users/${publicUserId}`;
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
|
@ -257,7 +257,7 @@ class Utils {
|
||||
|
||||
let confirmElement = modalElement.querySelector('.action-button[data-action="confirm"]');
|
||||
confirmElement.addEventListener('click', (event) => {
|
||||
fetch(`/profile/${userId}/avatar`, {method: 'DELETE', headers: {Accept: 'application/json'}})
|
||||
fetch(`/users/${userId}/avatar`, {method: 'DELETE', headers: {Accept: 'application/json'}})
|
||||
.then(
|
||||
(response) => {
|
||||
if (response.status === 403) {app.flash('Forbidden', 'error'); reject(response);}
|
||||
|
Reference in New Issue
Block a user