1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-23 01:39:36 +01:00
onion/js/actions/edition_list_actions.js
ddejongh 497e43005e Merge remote-tracking branch 'remotes/origin/master' into piece-detail-setup
Conflicts:
	css/main.css
	js/components/ascribe_table/table_item_subtable.js
2015-05-26 13:48:00 +02:00

27 lines
644 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({
'editionList': res.editions,
pieceId
});
})
.catch((err) => {
console.log(err);
});
}
}
export default alt.createActions(EditionListActions);