1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-25 02:46:09 +01:00
onion/js/components/whitelabel/prize/actions/prize_jury_actions.js
2015-08-05 14:40:26 +02:00

31 lines
729 B
JavaScript

'use strict';
import alt from '../../../../alt';
import Q from 'q';
import PrizeJuryFetcher from '../fetchers/prize_jury_fetcher';
class PrizeJuryActions {
constructor() {
this.generateActions(
'updatePrizeJury'
);
}
fetchJury() {
return Q.Promise((resolve, reject) => {
PrizeJuryFetcher
.fetch()
.then((res) => {
this.actions.updatePrizeJury(res.members);
resolve(res);
})
.catch((err) => {
console.logGlobal(err);
reject(err);
});
});
}
}
export default alt.createActions(PrizeJuryActions);