1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-15 01:25:17 +01:00
onion/js/actions/edition_actions.js
2015-05-26 16:46:02 +02:00

24 lines
514 B
JavaScript

import alt from '../alt';
import EditionFetcher from '../fetchers/edition_fetcher';
class EditionActions {
constructor() {
this.generateActions(
'updateEdition'
);
}
fetchOne(editionId) {
EditionFetcher.fetchOne(editionId)
.then((res) => {
this.actions.updateEdition(res.edition);
})
.catch((err) => {
console.log(err);
});
}
}
export default alt.createActions(EditionActions);