diff options
Diffstat (limited to 'frontend/admin.ts')
-rw-r--r-- | frontend/admin.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/frontend/admin.ts b/frontend/admin.ts index 1b6ba90..40a7a94 100644 --- a/frontend/admin.ts +++ b/frontend/admin.ts @@ -10,7 +10,7 @@ interface PendingBang { async function sendVerdict(user: string, pw: string, b: PendingBang, accept: boolean, info_block: HTMLDivElement) { - let err = await fetch(accept? "/acceptBang" : "/rejectBang", { + let err = await fetch(accept? "acceptBang" : "rejectBang", { headers: { Accept: "application/json", "Content-Type": "application/json", @@ -26,12 +26,12 @@ async function sendVerdict(user: string, pw: string, b: PendingBang, else info_block.remove() // TODO in the accept case, we should try invalidating the browser cache - // for /bangs.json. My idea is to make a HEAD request to let the browser + // for ./bangs.json. My idea is to make a HEAD request to let the browser // see that the etag has changed; idk of that works } export async function tryLoadAdminPanel(user: string, pw: string) { - const r = await fetch("/pendingBangs", { + const r = await fetch("pendingBangs", { headers: { Accept: "application/json", Authorization: "Basic " + btoa(`${user}:${pw}`), |