initial commit. Cloned timetracker repository
This commit is contained in:
14
bo/src/stores/settings.ts
Normal file
14
bo/src/stores/settings.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useFetchJson } from '@/composable/useFetchJson'
|
||||
import type { Resp } from '@/types'
|
||||
import type { Settings } from '@/types/settings'
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
export const useSettingsStore = defineStore('settings', () => {
|
||||
async function getSettings() {
|
||||
const { items } = await useFetchJson<Resp<Settings>>('/api/v1/settings',)
|
||||
console.log(items);
|
||||
}
|
||||
|
||||
getSettings()
|
||||
return {}
|
||||
})
|
||||
Reference in New Issue
Block a user