mirror of
https://github.com/ascribe/onion.git
synced 2024-11-15 09:35:10 +01:00
26 lines
535 B
JavaScript
26 lines
535 B
JavaScript
'use strict';
|
|
|
|
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.logGlobal(err);
|
|
});
|
|
}
|
|
}
|
|
|
|
export default alt.createActions(EditionActions);
|