fix: error when login
This commit is contained in:
parent
6ee80f6baa
commit
8594f87988
1048
final/client/package-lock.json
generated
1048
final/client/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
|
@ -82,8 +82,10 @@ function AuthContextProvider(props) {
|
|||
const response = await api.registerUser(userData);
|
||||
if (response.status === 200) {
|
||||
authReducer({
|
||||
type: AuthActionType.LOGOUT_USER,
|
||||
payload: null,
|
||||
type: AuthActionType.LOGIN_USER,
|
||||
payload: {
|
||||
user: response.data.user
|
||||
}
|
||||
})
|
||||
history.push("/");
|
||||
store.loadIdNamePairs();
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
"version": "1.0.0",
|
||||
"main": "index.js",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"start": "nodemon index.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"bcryptjs": "^2.4.3",
|
||||
"body-parser": "^1.19.0",
|
||||
|
|
Loading…
Reference in New Issue
Block a user