web/session: merge cached state into main lib

This commit is contained in:
wukko 2024-08-26 23:38:24 +06:00
parent 59308ed09f
commit 7524d202f7
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2
2 changed files with 4 additions and 8 deletions

View file

@ -1,10 +1,10 @@
import { get } from "svelte/store";
import turnstile from "$lib/api/turnstile";
import { writable, get } from "svelte/store";
import { currentApiURL } from "$lib/api/api-url";
import { cachedSession } from "$lib/state/session";
import type { CobaltSessionResponse, CobaltErrorResponse } from "$lib/types/api";
import type { CobaltSession, CobaltErrorResponse, CobaltSessionResponse } from "$lib/types/api";
const cachedSession = writable<CobaltSession | undefined>();
export const requestSession = async() => {
const apiEndpoint = `${currentApiURL()}/session`;

View file

@ -1,4 +0,0 @@
import { writable } from "svelte/store";
import type { CobaltSession } from "$lib/types/api";
export const cachedSession = writable<CobaltSession | undefined>();