diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-09-17 02:42:57 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-09-17 02:42:57 +0200 |
| commit | 021f46b9cf7c61efb8d2531694b0a724d6277c3f (patch) | |
| tree | 75018fba0c12c2de90e8651a617a3d4569c8184c /app/client/auth/auth.actions.js | |
| parent | 4c18946614657a9f8955408e514172a74eacc28e (diff) | |
signup
Diffstat (limited to 'app/client/auth/auth.actions.js')
| -rw-r--r-- | app/client/auth/auth.actions.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/app/client/auth/auth.actions.js b/app/client/auth/auth.actions.js index 33af206..c4d9b52 100644 --- a/app/client/auth/auth.actions.js +++ b/app/client/auth/auth.actions.js @@ -46,10 +46,9 @@ export function login(username, password) { .then(data => { console.log(data) dispatch(setCurrentUser(data.user)) - // dispatch(setToken(data.token)) }) .catch(error => { - console.log(error) + console.error(error) dispatch(setError(true)) }) } @@ -62,10 +61,10 @@ export function signup(data) { .then(req => req.json()) .then(data => { console.log(data) - dispatch(login(data.username, data.password)) + dispatch(setCurrentUser(data.user)) }) .catch(error => { - console.log(error) + console.error(error) dispatch(initialized()) }) } @@ -80,7 +79,7 @@ export function checkin() { dispatch(setCurrentUser(data.user)) }) .catch(error => { - console.log(error) + console.error(error) dispatch(initialized()) }) } |
