client/src/reducers/authReducer.js
changeset 67 9206af01f5e5
parent 62 b2514a9bcd49
child 88 2a861fed6bde
--- a/client/src/reducers/authReducer.js	Tue Jun 20 19:05:01 2017 +0200
+++ b/client/src/reducers/authReducer.js	Tue Jun 20 21:56:42 2017 +0200
@@ -1,5 +1,6 @@
 import Immutable from 'immutable';
 import * as types from '../constants/actionTypes';
+import UserRecord from '../store/userRecord';
 
 export const isAuthenticated = (state = false, action) => {
   switch (action.type) {
@@ -17,7 +18,7 @@
     case types.AUTH_LOGOUT:
       return null;
     case types.AUTH_LOGIN_SUCCESS:
-      return Immutable.Map(action.user);
+      return new UserRecord(action.user);
     case types.USER_UPDATE_SETTINGS:
       return state.merge({
         first_name: action.firstname,