Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time. Cannot retrieve contributors at this time
30 lines (27 sloc) 582 Bytes
import alt from '../altInstance';
import jsonrpc from '../util/jsonrpc';
class WriteupActions {
clearWriteups() {
this.dispatch();
}
updateWriteups(writeups) {
this.dispatch(writeups);
}
fetchFailed(message) {
this.dispatch(message);
}
clearWriteup() {
this.dispatch();
}
updateWriteup(writeup) {
this.dispatch(writeup);
}
saveWriteup(writeup) {
jsonrpc('save_writeup', [writeup]).then(
(savedWriteup) => {
this.actions.updateWriteup(savedWriteup);
}
);
}
}
export default alt.createActions(WriteupActions);