mirror of
https://github.com/koel/koel
synced 2024-12-22 10:33:16 +00:00
28 lines
482 B
JavaScript
28 lines
482 B
JavaScript
|
import http from '../services/http';
|
||
|
import stub from '../stubs/settings';
|
||
|
import sharedStore from './shared';
|
||
|
|
||
|
export default {
|
||
|
stub,
|
||
|
|
||
|
state: {
|
||
|
settings: [],
|
||
|
},
|
||
|
|
||
|
init() {
|
||
|
this.state.settings = sharedStore.state.settings;
|
||
|
},
|
||
|
|
||
|
all() {
|
||
|
return this.state.settings;
|
||
|
},
|
||
|
|
||
|
update(cb = null) {
|
||
|
http.post('settings', this.all(), msg => {
|
||
|
if (cb) {
|
||
|
cb();
|
||
|
}
|
||
|
});
|
||
|
},
|
||
|
};
|