feat: refs #6868 refs# 6868 handleUser

This commit is contained in:
Sergio De la torre 2024-09-12 17:09:27 +02:00
parent b492a1e6a8
commit 93e7163858
1 changed files with 15 additions and 2 deletions

View File

@ -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;
};
};