mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 17:33:14 +01:00
Remove unused PrizeList store and action
This commit is contained in:
parent
a6463087c0
commit
72db69ee9e
@ -1,34 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
import { alt } from '../alt';
|
||||
import Q from 'q';
|
||||
|
||||
import PrizeListFetcher from '../fetchers/prize_list_fetcher';
|
||||
|
||||
class PrizeListActions {
|
||||
constructor() {
|
||||
this.generateActions(
|
||||
'updatePrizeList'
|
||||
);
|
||||
}
|
||||
|
||||
fetchPrizeList() {
|
||||
return Q.Promise((resolve, reject) => {
|
||||
PrizeListFetcher
|
||||
.fetch()
|
||||
.then((res) => {
|
||||
this.actions.updatePrizeList({
|
||||
prizeList: res.prizes,
|
||||
prizeListCount: res.count
|
||||
});
|
||||
resolve(res);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.logGlobal(err);
|
||||
reject(err);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export default alt.createActions(PrizeListActions);
|
@ -76,8 +76,7 @@ let ApiUrls = {
|
||||
'webhooks': AppConstants.apiEndpoint + 'webhooks/',
|
||||
'webhooks_events': AppConstants.apiEndpoint + 'webhooks/events/',
|
||||
'whitelabel_settings': AppConstants.apiEndpoint + 'whitelabel/settings/${subdomain}/',
|
||||
'delete_s3_file': AppConstants.serverUrl + 's3/delete/',
|
||||
'prize_list': AppConstants.apiEndpoint + 'prize/'
|
||||
'delete_s3_file': AppConstants.serverUrl + 's3/delete/'
|
||||
};
|
||||
|
||||
|
||||
|
@ -1,12 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
import requests from '../utils/requests';
|
||||
|
||||
|
||||
let PrizeListFetcher = {
|
||||
fetch() {
|
||||
return requests.get('prize_list');
|
||||
}
|
||||
};
|
||||
|
||||
export default PrizeListFetcher;
|
@ -1,20 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
import { alt } from '../alt';
|
||||
|
||||
import PrizeListActions from '../actions/prize_list_actions';
|
||||
|
||||
class PrizeListStore {
|
||||
constructor() {
|
||||
this.prizeList = [];
|
||||
this.prizeListCount = -1;
|
||||
this.bindActions(PrizeListActions);
|
||||
}
|
||||
|
||||
onUpdatePrizeList({ prizeList, prizeListCount }) {
|
||||
this.prizeList = prizeList;
|
||||
this.prizeListCount = prizeListCount;
|
||||
}
|
||||
}
|
||||
|
||||
export default alt.createStore(PrizeListStore, 'PrizeListStore');
|
Loading…
Reference in New Issue
Block a user