Merge pull request #548 from lkiesow/users-reedirect
Prevent unnecessary redirect when requesting users
This commit is contained in:
@@ -62,7 +62,7 @@
|
|||||||
if (modal) {
|
if (modal) {
|
||||||
modal.showModal();
|
modal.showModal();
|
||||||
}
|
}
|
||||||
let res = await fetch(`/auth/users/`);
|
let res = await fetch(`/auth/users`);
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
let data = await res.json();
|
let data = await res.json();
|
||||||
allUsers = data;
|
allUsers = data;
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ export const load = (async (event) => {
|
|||||||
return redirect(302, '/login');
|
return redirect(302, '/login');
|
||||||
}
|
}
|
||||||
|
|
||||||
const res = await fetch(`${serverEndpoint}/auth/users/`, {
|
const res = await fetch(`${serverEndpoint}/auth/users`, {
|
||||||
headers: {
|
headers: {
|
||||||
Cookie: `sessionid=${sessionId}`
|
Cookie: `sessionid=${sessionId}`
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user