mirror of
https://github.com/koel/koel
synced 2024-11-24 21:23:06 +00:00
18 lines
382 B
TypeScript
18 lines
382 B
TypeScript
import { reactive } from 'vue'
|
|
import { httpService } 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 httpService.put('settings', settings)
|
|
merge(this.state, settings)
|
|
}
|
|
}
|