From 83ec6d69ebda405994a4c943c7220d821f49b6ab Mon Sep 17 00:00:00 2001 From: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com> Date: Fri, 6 May 2022 16:48:27 +0200 Subject: [PATCH] fix query to list API keys (#2690) Co-authored-by: CarinaWolli Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- apps/web/server/routers/viewer/apiKeys.tsx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/apps/web/server/routers/viewer/apiKeys.tsx b/apps/web/server/routers/viewer/apiKeys.tsx index 70c5f08d89..b11420f730 100644 --- a/apps/web/server/routers/viewer/apiKeys.tsx +++ b/apps/web/server/routers/viewer/apiKeys.tsx @@ -11,9 +11,16 @@ export const apiKeysRouter = createProtectedRouter() return await ctx.prisma.apiKey.findMany({ where: { userId: ctx.user.id, - NOT: { - appId: "zapier", - }, + OR: [ + { + NOT: { + appId: "zapier", + }, + }, + { + appId: null, + }, + ], }, orderBy: { createdAt: "desc" }, });