diff options
Diffstat (limited to 'frontend/adminpanel.ts')
-rw-r--r-- | frontend/adminpanel.ts | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/frontend/adminpanel.ts b/frontend/adminpanel.ts deleted file mode 100644 index aef7a31..0000000 --- a/frontend/adminpanel.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { e } from "./helper.ts" - -let user: string | undefined = undefined -let pw: string | undefined = undefined - -interface PendingBang { - bang: string, - name: string, - url: string, - email: string | undefined, -} - -export async function tryLoadAdminPanel(user_: string, pw_: string) { - user = user_ - pw = pw_ - - const r = await fetch("/pendingBangs", { - headers: { - Accept: "application/json", - Authorization: "Basic " + btoa(`${user}:${pw}`), - } - }) - if (!r.ok) - throw (await r.json()).message - - const pending = await r.json() as PendingBang[] - console.log(pending) -} |