mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
server/api: refactor + remove ID from user JSON
This commit is contained in:
@ -140,8 +140,13 @@ class Api {
|
||||
cookies.remove('auth');
|
||||
}
|
||||
|
||||
isLoggedIn() {
|
||||
return this.userName !== null;
|
||||
isLoggedIn(user) {
|
||||
if (user) {
|
||||
return this.userName !== null &&
|
||||
this.userName.toLowerCase() === user.name.toLowerCase();
|
||||
} else {
|
||||
return this.userName !== null;
|
||||
}
|
||||
}
|
||||
|
||||
getFullUrl(url) {
|
||||
|
Reference in New Issue
Block a user