Added workerId validation
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2020-02-28 09:23:02 +01:00
parent 3739548d0d
commit 96d98a6dcc
1 changed files with 2 additions and 0 deletions

View File

@ -24,6 +24,8 @@ module.exports = Self => {
}); });
Self.sendCheckingPresence = async(ctx, workerId, message) => { Self.sendCheckingPresence = async(ctx, workerId, message) => {
if (!workerId) return false;
const models = Self.app.models; const models = Self.app.models;
const account = await models.Account.findById(workerId); const account = await models.Account.findById(workerId);
const userId = ctx.req.accessToken.userId; const userId = ctx.req.accessToken.userId;