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,17 @@
var ErrorConstants = require('../constants/ErrorConstants');
var Error = require('../models').Error;
module.exports = function(state = new Error(), action) {
switch (action.type) {
case ErrorConstants.ERROR_AJAX:
case ErrorConstants.ERROR_SERVER:
case ErrorConstants.ERROR_CLIENT:
case ErrorConstants.ERROR_USER:
return action.error;
case ErrorConstants.CLEAR_ERROR:
return new Error();
default:
return state;
}
};