diff --git a/frontend/src/lib/user.ts b/frontend/src/lib/user.ts index 569356a6df..3d1502e8b4 100644 --- a/frontend/src/lib/user.ts +++ b/frontend/src/lib/user.ts @@ -1,7 +1,7 @@ import { get } from "svelte/store"; import { type User, UserService } from "$lib/gen"; import { superadmin, type UserExt } from "./stores.js"; -import { logout } from "./logout.js"; +import { goto } from "$app/navigation"; export async function refreshSuperadmin(): Promise { if (get(superadmin) == undefined) { @@ -14,7 +14,7 @@ export async function refreshSuperadmin(): Promise { } } catch { superadmin.set(false); - await logout(); + goto("/user/logout"); } } }