cryptgeon/frontend/src/lib/stores/status.ts
2022-01-02 23:46:08 +01:00

18 lines
303 B
TypeScript

import { call } from '$lib/api'
import { writable } from 'svelte/store'
export type Status = {
version: string
max_size: number
}
export const status = writable<null | Status>(null)
export async function init() {
const data = await call({
url: 'status',
method: 'get',
})
status.set(data)
}