This commit is contained in:
2023-10-08 14:34:38 +02:00
parent 51a605ffa5
commit 48961abdf6
17 changed files with 296 additions and 35 deletions

View File

@@ -3,7 +3,7 @@
import {fly} from "svelte/transition";
import {replace} from "svelte-spa-router";
import {EyeOutline, EyeSlashOutline, EyeSolid} from "flowbite-svelte-icons";
import {tokenStore} from "../repo/repo.js";
import {fetchWithToken, tokenStore} from "../repo/repo.js";
let show = false;
let loading = false;
@@ -12,7 +12,7 @@
async function handleSubmit() {
loading = true;
let res = await fetch("https://steamwar.de/eventplanner-api/data", {headers: {"X-SW-Auth": value}})
let res = await fetchWithToken(value, "/data")
loading = false;
if(res.ok) {
$tokenStore = value;