initial commit. Cloned timetracker repository
This commit is contained in:
11
bo/src/router/settings.ts
Normal file
11
bo/src/router/settings.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { useFetchJson } from "@/composable/useFetchJson";
|
||||
import type { Resp } from "@/types";
|
||||
import type { Settings } from "@/types/settings";
|
||||
import { reactive } from "vue";
|
||||
|
||||
export const settings = reactive({} as Settings)
|
||||
|
||||
export async function getSettings() {
|
||||
const { items } = await useFetchJson<Resp<Settings>>('/api/v1/settings',)
|
||||
Object.assign(settings, items)
|
||||
}
|
||||
Reference in New Issue
Block a user