koel/resources/assets/js/stores/setting.js
2015-12-30 11:15:21 +07:00

22 lines
383 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(), cb, error);
},
};