From 80b9815a577da78808deb5ff9f1a5671e4ac2bdb Mon Sep 17 00:00:00 2001 From: nelo Date: Thu, 15 Jun 2017 11:59:15 +0200 Subject: [PATCH] callback error list warehouses, change-state --- services/production/common/methods/ticket-state/change-state.js | 2 ++ services/production/common/methods/warehouse/list-warehouses.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/services/production/common/methods/ticket-state/change-state.js b/services/production/common/methods/ticket-state/change-state.js index 4e7cbbffb..687b8ba22 100644 --- a/services/production/common/methods/ticket-state/change-state.js +++ b/services/production/common/methods/ticket-state/change-state.js @@ -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"); diff --git a/services/production/common/methods/warehouse/list-warehouses.js b/services/production/common/methods/warehouse/list-warehouses.js index 326244943..c22235509 100644 --- a/services/production/common/methods/warehouse/list-warehouses.js +++ b/services/production/common/methods/warehouse/list-warehouses.js @@ -15,6 +15,8 @@ module.exports = function(Warehouse) { Warehouse.find(where(), function(err, warehouses){ if(!err) cb(null, warehouses); + else + cb(err, null); }); };