Skip to content

Scheduling infrastructure for absolutely everyone.

fix query to list API keys (#2690)

Carina Wollendorfer83ec6d69ebda
diff --git a/apps/web/server/routers/viewer/apiKeys.tsx b/apps/web/server/routers/viewer/apiKeys.tsx
index 70c5f08d898..b11420f730d 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" },
});