Skip to content

Commit

Permalink
Sprint 32 (#520)
Browse files Browse the repository at this point in the history
* Resolves #430
  • Loading branch information
raschdiaz committed Dec 7, 2020
1 parent 3a4b473 commit 1aa537c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions store/reducers/user.reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default function userReducer(state = initialState, action) {
};
case actions.USER_LOGIN_SUCCESS: {
let state = { ...newState };
if (newState.userData.username !== action.user.user_nicename) {
if (newState.userData.username !== action.user.username) {
state = {
...state,
pinCode: {
Expand All @@ -59,7 +59,7 @@ export default function userReducer(state = initialState, action) {
userData: {
domain: action.domain,
token: action.user.token,
username: action.user.user_nicename,
username: action.user.username,
password: action.user.password,
displayName: action.user.user_display_name,
email: action.user.user_email,
Expand Down
6 changes: 5 additions & 1 deletion store/sagas/user.sagas.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ export function* login({ domain, username, password }) {
const jsonData = response.data;

if (response.status === 200) {
yield put({ type: actions.USER_LOGIN_SUCCESS, domain, user: { ...jsonData, password } });
yield put({
type: actions.USER_LOGIN_SUCCESS,
domain,
user: { ...jsonData, username, password },
});
yield put({ type: actions.USER_GET_PUSH_TOKEN, domain, token: jsonData.token });
} else {
yield put({
Expand Down

0 comments on commit 1aa537c

Please sign in to comment.