diff options
| author | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-08-19 15:39:58 +0200 |
|---|---|---|
| committer | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-09-23 10:05:43 +0200 |
| commit | 19033b8460cb43dc2fa34a2cffa932b5efe111ca (patch) | |
| tree | 79bde2093acce8d8192d27e288d61bc53cf99e07 /src/api/sagas/users.js | |
| parent | 434be6d21ad665cb6abdf5138d0c563efbfe00b4 (diff) | |
Add profile page
Diffstat (limited to 'src/api/sagas/users.js')
| -rw-r--r-- | src/api/sagas/users.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/api/sagas/users.js b/src/api/sagas/users.js index d3ef32a6..c1daab30 100644 --- a/src/api/sagas/users.js +++ b/src/api/sagas/users.js @@ -2,6 +2,7 @@ import {call, put} from "redux-saga/effects"; import {logInSucceeded} from "../../actions/auth"; import {addToAuthorizationStore} from "../../actions/objects"; import {fetchAuthorizationsOfCurrentUserSucceeded} from "../../actions/users"; +import {saveAuthLocalStorage} from "../../auth/index"; import {performTokenSignIn} from "../routes/auth"; import {addUser, getAuthorizationsByUser} from "../routes/users"; import {fetchAndStoreSimulation, fetchAndStoreUser} from "./objects"; @@ -12,6 +13,7 @@ export function* onFetchLoggedInUser(action) { let userId = tokenResponse.userId; if (tokenResponse.isNewUser) { + saveAuthLocalStorage({authToken: action.payload.authToken}); const newUser = yield call(addUser, action.payload); userId = newUser.id; } |
