diff --git a/modules/worker/back/methods/device/handle-user.js b/modules/worker/back/methods/device/handle-user.js index 02b505e39..87aec378e 100644 --- a/modules/worker/back/methods/device/handle-user.js +++ b/modules/worker/back/methods/device/handle-user.js @@ -59,8 +59,12 @@ module.exports = Self => { } }, myOptions); - if (!isUserInOperator) - await models.Operator.create({'workerFk': user.id}); + if (!isUserInOperator) { + await models.Operator.create({ + 'workerFk': user.id, + 'isOnReservationMode': false + }); + } const whereCondition = deviceId ? {id: deviceId} : {android_id: androidId}; const serialNumber = @@ -103,12 +107,21 @@ module.exports = Self => { const getVersion = await models.MobileAppVersionControl.getVersion(ctx, nameApp); const combinedResult = { + ...getDataOperator.toObject(), + ...getDataUser.toObject(), + ...getVersion, + message: vMessage, + serialNumber, + }; + + const combinedResult2 = { ...getDataOperator.__data, ...getDataUser.__data, ...getVersion, message: vMessage, serialNumber, }; + console.log('conbinedResult2', combinedResult2); return combinedResult; }; };