Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/pipeline/head Something is wrong with the build of this commit Details

This commit is contained in:
Joan Sanchez 2020-02-28 08:34:42 +01:00
commit 25a1c0d2de
2 changed files with 6 additions and 2 deletions

View File

@ -26,6 +26,10 @@ module.exports = Self => {
Self.sendCheckingPresence = async(ctx, workerId, message) => {
const models = Self.app.models;
const account = await models.Account.findById(workerId);
const userId = ctx.req.accessToken.userId;
if (!account)
throw new Error(`Could not send message to worker id ${workerId} from user ${userId}`);
const query = `SELECT worker_isWorking(?) isWorking`;
const [result] = await Self.rawSql(query, [workerId]);

View File

@ -13,10 +13,10 @@
},
"properties": {
"id": {
"type": "Number",
"id": true
"type": "Number"
},
"dmsFk": {
"id": true,
"type": "Number",
"required": true,
"mysql": {