mirror of
https://github.com/ascribe/onion.git
synced 2024-11-15 17:45:10 +01:00
31 lines
729 B
JavaScript
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); |