From 83090e4570bac58cf55d9380c31d31bc9ec4f40c Mon Sep 17 00:00:00 2001 From: Ferit Topcu Date: Wed, 27 Feb 2019 13:43:05 +0100 Subject: [PATCH] GH-501 providing the correct where query and update username --- server/handler/CheckHandler.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/handler/CheckHandler.js b/server/handler/CheckHandler.js index 6a8379c4..a4e2d3cc 100644 --- a/server/handler/CheckHandler.js +++ b/server/handler/CheckHandler.js @@ -55,11 +55,10 @@ export class CheckHandler { const userName = user.json.login; debug(`refreshing token for all checks for repo ${repoId} w/ token ${token ? token.substr(0, 4) : 'NONE'} by user ${userName} `) try { - return await Check.update({ token: token }, + return await Check.update({ token: token, created_by: userName }, { where: { - repositoryId: repoId, - created_by: userName + repositoryId: repoId }, returning: true });