mirror of
https://github.com/ascribe/onion.git
synced 2024-11-16 01:55:07 +01:00
28 lines
575 B
JavaScript
28 lines
575 B
JavaScript
'use strict';
|
|
|
|
import { alt } from '../../../../../alt';
|
|
|
|
import PrizeFetcher from '../fetchers/prize_fetcher';
|
|
|
|
class PrizeActions {
|
|
constructor() {
|
|
this.generateActions(
|
|
'updatePrize'
|
|
);
|
|
}
|
|
|
|
fetchPrize() {
|
|
PrizeFetcher
|
|
.fetch()
|
|
.then((res) => {
|
|
this.actions.updatePrize({
|
|
prize: res.prize
|
|
});
|
|
})
|
|
.catch((err) => {
|
|
console.logGlobal(err);
|
|
});
|
|
}
|
|
}
|
|
|
|
export default alt.createActions(PrizeActions); |