callback error list warehouses, change-state

This commit is contained in:
nelo 2017-06-15 11:59:15 +02:00
parent bc4402ce22
commit 80b9815a57
2 changed files with 4 additions and 0 deletions

View File

@ -33,6 +33,8 @@ module.exports = function(TicketState) {
TicketState.app.models.Employee.findOne({where: {userFk: ctx.req.accessToken.userId}}, function(err, emp){
if(!err)
changeState(emp.id, tickets, state, cb);
else
cb(err, null);
});
TicketState.disconnectFromService("client");

View File

@ -15,6 +15,8 @@ module.exports = function(Warehouse) {
Warehouse.find(where(), function(err, warehouses){
if(!err)
cb(null, warehouses);
else
cb(err, null);
});
};