Skip to content

Commit

Permalink
Merge pull request #7 from brionmario/feature/create-session
Browse files Browse the repository at this point in the history
feature: create session ✨
  • Loading branch information
brionmario authored May 3, 2019
2 parents 33fe137 + 1ce5fa4 commit c7241b9
Show file tree
Hide file tree
Showing 12 changed files with 656 additions and 206 deletions.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
NODE_PATH=./src
REACT_APP_PROD_API_ENDPOINT = 'http://localhost:5000/api/v1'
REACT_APP_DEV_API_ENDPOINT = 'http://localhost:5000/api/v1'
REACT_APP_PROD_WEBSOCKET_ENDPOINT = 'http://127.0.0.1:5000'
REACT_APP_DEV_WEBSOCKET_ENDPOINT = 'http://127.0.0.1:5000'
REACT_APP_COOKIE_NAME = 'cssi_user'
REACT_APP_COOKIE_PATH = '/'
REACT_APP_LOGOUT_PATH = '/login?logout=true'
Expand Down
218 changes: 218 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"redux-thunk": "^2.3.0",
"semver": "^5.5.1",
"sha256": "^0.2.0",
"socket.io-client": "^2.2.0",
"uniqid": "^5.0.3",
"universal-cookie": "^2.1.5",
"uuid": "^3.3.2",
Expand Down
12 changes: 7 additions & 5 deletions src/api.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const BASE_API = process.env.NODE_ENV === 'production'
? process.env.REACT_APP_PROD_API_ENDPOINT
: process.env.REACT_APP_DEV_API_ENDPOINT;
const BASE_API =
process.env.NODE_ENV === 'production'
? process.env.REACT_APP_PROD_API_ENDPOINT
: process.env.REACT_APP_DEV_API_ENDPOINT;

const API_ENDPOINTS = {
authorize: `${BASE_API}/auth/`,
Expand All @@ -19,10 +20,11 @@ const API_ENDPOINTS = {
editApplication: `${BASE_API}/applications/{}/`,
deleteApplication: `${BASE_API}/applications/{}/`,
getQuestionnaires: `${BASE_API}/questionnaires/`,
getQuestionnaireInfo: `${BASE_API}/questionnaires/{}/`,
updateQuestionnaire: `${BASE_API}/questionnaires/{}/`,
getQuestionnaireInfo: `${BASE_API}/questionnaires/{}`,
updateQuestionnaire: `${BASE_API}/questionnaires/{}/post`,
createQuestionnaire: `${BASE_API}/questionnaires/`,
initializeSession: `${BASE_API}/sessions/`,
getSessionInfo: `${BASE_API}/sessions/{}`
};

export { API_ENDPOINTS };
Loading

0 comments on commit c7241b9

Please sign in to comment.