mirror of
https://github.com/koel/koel
synced 2024-12-22 10:33:16 +00:00
18 lines
368 B
TypeScript
18 lines
368 B
TypeScript
import { reactive } from 'vue'
|
|
import { http } from '@/services'
|
|
import { merge } from 'lodash'
|
|
|
|
export const settingStore = {
|
|
state: reactive<Settings>({
|
|
media_path: ''
|
|
}),
|
|
|
|
init (settings: Settings) {
|
|
merge(this.state, settings)
|
|
},
|
|
|
|
async update (settings: Settings) {
|
|
await http.put('settings', settings)
|
|
merge(this.state, settings)
|
|
}
|
|
}
|