fix some UI bugs, warnings and some preload issues.
This commit is contained in:
@@ -529,7 +529,7 @@ function applyFeaturePermissionRules() {
|
||||
async function loadCurrentUser() {
|
||||
loadServerVersion();
|
||||
try {
|
||||
const res = await fetch("/api/auth/me");
|
||||
const res = await fetch("/api/auth/me", { credentials: "include" });
|
||||
if (res.ok) {
|
||||
currentUser = await res.json();
|
||||
if (currentUser && currentUser.username && currentUser.role) {
|
||||
@@ -1705,7 +1705,7 @@ window.setClientGroup = async (clientId, groupId) => {
|
||||
|
||||
async function loadGroups() {
|
||||
try {
|
||||
const res = await fetch("/api/groups");
|
||||
const res = await fetch("/api/groups", { credentials: "include" });
|
||||
if (!res.ok) return [];
|
||||
const data = await res.json();
|
||||
return data.groups || [];
|
||||
|
||||
Reference in New Issue
Block a user