Changes
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user