diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-09-17 02:25:36 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-09-17 02:25:36 +0200 |
| commit | 4c18946614657a9f8955408e514172a74eacc28e (patch) | |
| tree | 1fa92e5e7f798203d40e846bd8577b0459af1fcd /app/client/auth/auth.actions.js | |
| parent | 7ef59901e08b6610f134c696876695cf52061f48 (diff) | |
logging i
Diffstat (limited to 'app/client/auth/auth.actions.js')
| -rw-r--r-- | app/client/auth/auth.actions.js | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/app/client/auth/auth.actions.js b/app/client/auth/auth.actions.js index 8d9a819..33af206 100644 --- a/app/client/auth/auth.actions.js +++ b/app/client/auth/auth.actions.js @@ -45,9 +45,8 @@ export function login(username, password) { .then(req => req.json()) .then(data => { console.log(data) - dispatch(setCurrentUser(data)) + dispatch(setCurrentUser(data.user)) // dispatch(setToken(data.token)) - dispatch(checkin()) }) .catch(error => { console.log(error) @@ -78,13 +77,11 @@ export function checkin() { fetch(api.checkin, put({})) .then(req => req.json()) .then(data => { - console.log(data) - dispatch(setCurrentUser(data)) - console.log('set current user') + dispatch(setCurrentUser(data.user)) }) .catch(error => { console.log(error) - dispatch(initialized(true)) + dispatch(initialized()) }) } } |
