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) }