feat: admins can change user's roles

refactor: banned role has priority over all other roles when displaying
chore: npm run format
This commit is contained in:
2026-01-06 14:07:55 -05:00
parent fe54ff15ce
commit 99feb2795a
8 changed files with 188 additions and 112 deletions
-12
View File
@@ -98,15 +98,3 @@ export function clearServerTokens(cookies: Cookies) {
cookies.delete('token', { path: '/' });
cookies.delete('refreshToken', { path: '/' });
}
export function getUserUUIDFromToken() {
if (!browser) return null;
const token = getToken();
if (!token) return null;
try {
const payload = JSON.parse(atob(token.split('.')[1]));
return payload.UUID || null;
} catch {
return null;
}
}