From 84703779a92e397a227503b471b79794e4a314c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Fri, 31 Jul 2015 13:44:57 +0200 Subject: [PATCH] rename prize endpoint to prizes --- .gitignore | 1 + .../whitelabel/prize/constants/api_urls.js | 14 +++++++------- .../prize/constants/application_prize_constants.js | 9 +++++++++ js/components/whitelabel/prize/routes.js | 2 +- 4 files changed, 18 insertions(+), 8 deletions(-) create mode 100644 js/components/whitelabel/prize/constants/application_prize_constants.js diff --git a/.gitignore b/.gitignore index b39d7830..8378467f 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ lib-cov *.gz *.sublime-project *.sublime-workspace +webapp-dependencies.txt pids logs diff --git a/js/components/whitelabel/prize/constants/api_urls.js b/js/components/whitelabel/prize/constants/api_urls.js index e868d403..178dfdfa 100644 --- a/js/components/whitelabel/prize/constants/api_urls.js +++ b/js/components/whitelabel/prize/constants/api_urls.js @@ -1,15 +1,15 @@ 'use strict'; -import AppConstants from '../../../../constants/application_constants'; +import AppPrizeConstants from './application_prize_constants'; function getApiUrls(subdomain) { return { - 'pieces_list': AppConstants.apiEndpoint + 'prize/' + subdomain + '/pieces/', - 'users_login': AppConstants.apiEndpoint + 'prize/' + subdomain + '/users/login/', - 'users_signup': AppConstants.apiEndpoint + 'prize/' + subdomain + '/users/', - 'user': AppConstants.apiEndpoint + 'prize/' + subdomain + '/users/', - 'piece_submit_to_prize': AppConstants.apiEndpoint + 'prize/' + subdomain + '/pieces/${piece_id}/submit/', - 'piece': AppConstants.apiEndpoint + 'prize/' + subdomain + '/pieces/${piece_id}/' + 'pieces_list': AppPrizeConstants.prizeApiEndpoint + subdomain + '/pieces/', + 'users_login': AppPrizeConstants.prizeApiEndpoint + subdomain + '/users/login/', + 'users_signup': AppPrizeConstants.prizeApiEndpoint + subdomain + '/users/', + 'user': AppPrizeConstants.prizeApiEndpoint + subdomain + '/users/', + 'piece_submit_to_prize': AppPrizeConstants.prizeApiEndpoint + subdomain + '/pieces/${piece_id}/submit/', + 'piece': AppPrizeConstants.prizeApiEndpoint + subdomain + '/pieces/${piece_id}/' }; } diff --git a/js/components/whitelabel/prize/constants/application_prize_constants.js b/js/components/whitelabel/prize/constants/application_prize_constants.js new file mode 100644 index 00000000..6026193b --- /dev/null +++ b/js/components/whitelabel/prize/constants/application_prize_constants.js @@ -0,0 +1,9 @@ +'use strict'; + +import AppConstants from '../../../../constants/application_constants'; + +let constants = { + prizeApiEndpoint: AppConstants.apiEndpoint + 'prizes/' +}; + +export default constants; \ No newline at end of file diff --git a/js/components/whitelabel/prize/routes.js b/js/components/whitelabel/prize/routes.js index ac490c4e..9d4e12e0 100644 --- a/js/components/whitelabel/prize/routes.js +++ b/js/components/whitelabel/prize/routes.js @@ -21,7 +21,7 @@ let Route = Router.Route; let baseUrl = AppConstants.baseUrl; -function getRoutes(commonRoutes) { +function getRoutes() { return (