diff --git a/src/app/shared/state/auth.reducer.ts b/src/app/shared/state/auth.reducer.ts index 7c5b6d4..065b55d 100644 --- a/src/app/shared/state/auth.reducer.ts +++ b/src/app/shared/state/auth.reducer.ts @@ -29,6 +29,27 @@ export const authReducer = createReducer( user: null, error: null }; + }), + on(AuthApiActions.getAuthStatusSuccess, (state, action) => { + return { + gettingStatus: false, + user: action.user, + error: null + }; + }), + on(AuthApiActions.loginSuccess, (state, action) => { + return { + gettingStatus: false, + user: action.user, + error: null + }; + }), + on(AuthApiActions.loginFailure, (state, action) => { + return { + gettingStatus: false, + user: null, + error: action.reason + }; }) );