diff options
Diffstat (limited to 'app/client/auth/auth.actions.js')
| -rw-r--r-- | app/client/auth/auth.actions.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/client/auth/auth.actions.js b/app/client/auth/auth.actions.js index 3171996..8d9a819 100644 --- a/app/client/auth/auth.actions.js +++ b/app/client/auth/auth.actions.js @@ -45,7 +45,8 @@ export function login(username, password) { .then(req => req.json()) .then(data => { console.log(data) - dispatch(setToken(data.token)) + dispatch(setCurrentUser(data)) + // dispatch(setToken(data.token)) dispatch(checkin()) }) .catch(error => { @@ -71,7 +72,7 @@ export function signup(data) { } } -export function checkin(history) { +export function checkin() { return (dispatch) => { dispatch(loading()) fetch(api.checkin, put({})) @@ -83,7 +84,6 @@ export function checkin(history) { }) .catch(error => { console.log(error) - // history.go('/login') dispatch(initialized(true)) }) } |
