Type auth store

This commit is contained in:
Adria Navarro 2025-01-09 11:42:35 +01:00
parent a0950f15d9
commit 60c23ae021
2 changed files with 4 additions and 2 deletions

View File

@ -2,7 +2,9 @@ import { API } from "api"
import { writable } from "svelte/store" import { writable } from "svelte/store"
const createAuthStore = () => { const createAuthStore = () => {
const store = writable(null) const store = writable<{
csrfToken?: string
} | null>(null)
// Fetches the user object if someone is logged in and has reloaded the page // Fetches the user object if someone is logged in and has reloaded the page
const fetchUser = async () => { const fetchUser = async () => {

View File

@ -15,5 +15,5 @@ export interface GetGlobalSelfResponse extends User {
license: License license: License
budibaseAccess: boolean budibaseAccess: boolean
accountPortalAccess: boolean accountPortalAccess: boolean
csrfToken: boolean csrfToken: string
} }