diff --git a/js/actions/prize_list_actions.js b/js/actions/prize_list_actions.js deleted file mode 100644 index da2f97df..00000000 --- a/js/actions/prize_list_actions.js +++ /dev/null @@ -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); \ No newline at end of file diff --git a/js/constants/api_urls.js b/js/constants/api_urls.js index e7f11141..f7bac317 100644 --- a/js/constants/api_urls.js +++ b/js/constants/api_urls.js @@ -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/' }; diff --git a/js/fetchers/prize_list_fetcher.js b/js/fetchers/prize_list_fetcher.js deleted file mode 100644 index 150f07a1..00000000 --- a/js/fetchers/prize_list_fetcher.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -import requests from '../utils/requests'; - - -let PrizeListFetcher = { - fetch() { - return requests.get('prize_list'); - } -}; - -export default PrizeListFetcher; diff --git a/js/stores/prize_list_store.js b/js/stores/prize_list_store.js deleted file mode 100644 index 87b94f01..00000000 --- a/js/stores/prize_list_store.js +++ /dev/null @@ -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'); \ No newline at end of file