1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-23 14:59:36 +02:00

Merge pull request #548 from lkiesow/users-reedirect

Prevent unnecessary redirect when requesting users
This commit is contained in:
Sean Morley 2025-04-06 20:23:53 -04:00 committed by GitHub
commit af2778ff61
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -62,7 +62,7 @@
if (modal) {
modal.showModal();
}
let res = await fetch(`/auth/users/`);
let res = await fetch(`/auth/users`);
if (res.ok) {
let data = await res.json();
allUsers = data;

View file

@ -9,7 +9,7 @@ export const load = (async (event) => {
return redirect(302, '/login');
}
const res = await fetch(`${serverEndpoint}/auth/users/`, {
const res = await fetch(`${serverEndpoint}/auth/users`, {
headers: {
Cookie: `sessionid=${sessionId}`
}