mirror of
https://github.com/koel/koel
synced 2024-12-29 22:13:06 +00:00
26 lines
461 B
JavaScript
26 lines
461 B
JavaScript
import http from '../services/http';
|
|
import stub from '../stubs/settings';
|
|
|
|
export default {
|
|
stub,
|
|
|
|
state: {
|
|
settings: [],
|
|
},
|
|
|
|
init(settings) {
|
|
this.state.settings = settings;
|
|
},
|
|
|
|
all() {
|
|
return this.state.settings;
|
|
},
|
|
|
|
update(cb = null, error = null) {
|
|
http.post('settings', this.all(), msg => {
|
|
if (cb) {
|
|
cb();
|
|
}
|
|
}, { error });
|
|
},
|
|
};
|