update getAllwebsites, match usage query with api / cloud call

This commit is contained in:
Francis Cao committed 2024-05-14 09:39:04 -07:00
1 parent 8fc755df99
commit e701d6976b
2 files changed
+14 -3

No files matched your search

+13 -1
View File
@@ -48,7 +48,19 @@ export async function getWebsites(
export async function getAllWebsites(userId: string) {
return prisma.client.website.findMany({
where: {
userId,
OR: [
{ userId },
{
team: {
deletedAt: null,
teamUser: {
some: {
userId,
},
},
},
},
],
},
});
}