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);
|
const response = await api.registerUser(userData);
|
||||||
if (response.status === 200) {
|
if (response.status === 200) {
|
||||||
authReducer({
|
authReducer({
|
||||||
type: AuthActionType.LOGOUT_USER,
|
type: AuthActionType.LOGIN_USER,
|
||||||
payload: null,
|
payload: {
|
||||||
|
user: response.data.user
|
||||||
|
}
|
||||||
})
|
})
|
||||||
history.push("/");
|
history.push("/");
|
||||||
store.loadIdNamePairs();
|
store.loadIdNamePairs();
|
||||||
|
|
|
@ -3,6 +3,9 @@
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"scripts": {
|
||||||
|
"start": "nodemon index.js"
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bcryptjs": "^2.4.3",
|
"bcryptjs": "^2.4.3",
|
||||||
"body-parser": "^1.19.0",
|
"body-parser": "^1.19.0",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user