fix: error when login

This commit is contained in:
Renge 2022-09-21 16:21:27 -04:00
parent 6ee80f6baa
commit 8594f87988
3 changed files with 735 additions and 322 deletions

File diff suppressed because it is too large Load Diff

View File

@ -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();

View File

@ -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",