mirror of
https://github.com/ascribe/onion.git
synced 2025-01-03 18:35:09 +01:00
24 lines
561 B
JavaScript
24 lines
561 B
JavaScript
import alt from '../alt';
|
|
|
|
import EditionListFetcher from '../fetchers/edition_list_fetcher.js';
|
|
|
|
class EditionListActions {
|
|
constructor() {
|
|
this.generateActions(
|
|
'updateEditionList'
|
|
);
|
|
}
|
|
|
|
fetchEditionList(pieceId) {
|
|
EditionListFetcher
|
|
.fetch(pieceId)
|
|
.then((res) => {
|
|
this.actions.updateEditionList(res.editions);
|
|
})
|
|
.catch((err) => {
|
|
console.log(err);
|
|
});
|
|
}
|
|
};
|
|
|
|
export default alt.createActions(EditionListActions); |