Initial commit

This commit is contained in:
2016-12-22 21:22:47 -05:00
commit df4970c4c3
19 changed files with 1116 additions and 0 deletions

View File

@ -0,0 +1,15 @@
var UserConstants = require('../constants/UserConstants');
var User = require('../models').User;
module.exports = function(state = new User(), action) {
switch (action.type) {
case UserConstants.USER_FETCHED:
case UserConstants.USER_UPDATED:
return action.user;
case UserConstants.USER_LOGGEDOUT:
return new User();
default:
return state;
}
};