mirror of
https://github.com/koel/koel
synced 2024-12-21 01:53:11 +00:00
21 lines
410 B
TypeScript
21 lines
410 B
TypeScript
import { reactive } from 'vue'
|
|
import { httpService } from '@/services'
|
|
|
|
export const settingStore = {
|
|
state: reactive<Settings>({
|
|
media_path: ''
|
|
}),
|
|
|
|
init (settings: Settings) {
|
|
Object.assign(this.state, settings)
|
|
},
|
|
|
|
get all () {
|
|
return this.state
|
|
},
|
|
|
|
async update (settings: Settings) {
|
|
await httpService.put('settings', settings)
|
|
Object.assign(this.state, settings)
|
|
}
|
|
}
|