1
0
Fork 0
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:
muerwre 2019-04-04 17:41:09 +07:00
parent 4f86847e59
commit 8071a1644c
6 changed files with 42 additions and 17 deletions

View file

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