mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
persisted user profile
This commit is contained in:
parent
4f86847e59
commit
8071a1644c
6 changed files with 42 additions and 17 deletions
|
@ -14,9 +14,9 @@ function* sendLoginRequestSaga({ username, password }: ReturnType<typeof ActionC
|
|||
|
||||
if (!token) return yield put(userSetLoginError({ error: USER_STATUSES[status] || USER_ERRORS.INVALID_CREDENTIALS }));
|
||||
|
||||
const { id, role, email, activated } = user;
|
||||
const { id, role, email, activated: is_activated } = user;
|
||||
|
||||
yield put(userSetUser({ token, id, role, email, username: user.username, activated, }));
|
||||
yield put(userSetUser({ token, id, role, email, username: user.username, is_activated, is_user: true }));
|
||||
yield put(push('/'));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue