mirror of
https://github.com/koel/koel
synced 2024-12-22 10:33:16 +00:00
24 lines
409 B
JavaScript
24 lines
409 B
JavaScript
import { http } from '../services';
|
|
import stub from '../stubs/settings';
|
|
|
|
export const settingStore = {
|
|
stub,
|
|
|
|
state: {
|
|
settings: [],
|
|
},
|
|
|
|
init(settings) {
|
|
this.state.settings = settings;
|
|
},
|
|
|
|
get all() {
|
|
return this.state.settings;
|
|
},
|
|
|
|
update() {
|
|
return new Promise((resolve, reject) => {
|
|
http.post('settings', this.all, r => resolve(r), r => reject(r));
|
|
});
|
|
},
|
|
};
|