From cd3125954ef09cf3c0fc495d12da2e56ace7dbb8 Mon Sep 17 00:00:00 2001 From: keyan Date: Tue, 1 Mar 2022 11:08:44 -0600 Subject: [PATCH] make sure it's the user's job --- api/resolvers/user.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/resolvers/user.js b/api/resolvers/user.js index e1137509..348d1a52 100644 --- a/api/resolvers/user.js +++ b/api/resolvers/user.js @@ -216,7 +216,8 @@ export default { }, maxBid: { not: null - } + }, + userId: user.id } if (user.checkedNotesAt) { @@ -224,8 +225,7 @@ export default { gt: user.checkedNotesAt } } - - const job = user.checkedNotesAt && await models.item.findFirst({ where }) + const job = await models.item.findFirst({ where }) if (job) { return true }