Type auth store
This commit is contained in:
parent
a0950f15d9
commit
60c23ae021
|
@ -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 () => {
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue