fix query to list API keys (#2690)
Co-authored-by: CarinaWolli <wollencarina@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>pull/2688/head^2
parent
65a76b96c6
commit
83ec6d69eb
|
@ -11,9 +11,16 @@ export const apiKeysRouter = createProtectedRouter()
|
||||||
return await ctx.prisma.apiKey.findMany({
|
return await ctx.prisma.apiKey.findMany({
|
||||||
where: {
|
where: {
|
||||||
userId: ctx.user.id,
|
userId: ctx.user.id,
|
||||||
NOT: {
|
OR: [
|
||||||
appId: "zapier",
|
{
|
||||||
},
|
NOT: {
|
||||||
|
appId: "zapier",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
appId: null,
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
orderBy: { createdAt: "desc" },
|
orderBy: { createdAt: "desc" },
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue