mirror of
https://github.com/aclindsa/moneygo.git
synced 2024-10-30 15:50:04 -04:00
15 lines
346 B
JavaScript
15 lines
346 B
JavaScript
|
var UserConstants = require('../constants/UserConstants');
|
||
|
|
||
|
var Session = require('../models').Session;
|
||
|
|
||
|
module.exports = function(state = new Session(), action) {
|
||
|
switch (action.type) {
|
||
|
case UserConstants.USER_LOGGEDIN:
|
||
|
return action.session;
|
||
|
case UserConstants.USER_LOGGEDOUT:
|
||
|
return new Session();
|
||
|
default:
|
||
|
return state;
|
||
|
}
|
||
|
};
|