mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-01 12:29:35 +01:00
update getAllwebsites, match usage query with api / cloud call
This commit is contained in:
parent
8fc755df99
commit
e701d6976b
@ -7,8 +7,7 @@ import * as yup from 'yup';
|
||||
|
||||
export interface UserUsageRequestQuery {
|
||||
id: string;
|
||||
startAt: string;
|
||||
endAt: string;
|
||||
params: { startAt: string; endAt: string };
|
||||
}
|
||||
|
||||
export interface UserUsageRequestResponse {
|
||||
|
@ -48,8 +48,20 @@ export async function getWebsites(
|
||||
export async function getAllWebsites(userId: string) {
|
||||
return prisma.client.website.findMany({
|
||||
where: {
|
||||
OR: [
|
||||
{ userId },
|
||||
{
|
||||
team: {
|
||||
deletedAt: null,
|
||||
teamUser: {
|
||||
some: {
|
||||
userId,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user