15 lines
414 B
TypeScript
15 lines
414 B
TypeScript
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 {}
|
|
})
|