mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-01 20:39:44 +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 {
|
export interface UserUsageRequestQuery {
|
||||||
id: string;
|
id: string;
|
||||||
startAt: string;
|
params: { startAt: string; endAt: string };
|
||||||
endAt: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface UserUsageRequestResponse {
|
export interface UserUsageRequestResponse {
|
||||||
|
@ -48,7 +48,19 @@ export async function getWebsites(
|
|||||||
export async function getAllWebsites(userId: string) {
|
export async function getAllWebsites(userId: string) {
|
||||||
return prisma.client.website.findMany({
|
return prisma.client.website.findMany({
|
||||||
where: {
|
where: {
|
||||||
userId,
|
OR: [
|
||||||
|
{ userId },
|
||||||
|
{
|
||||||
|
team: {
|
||||||
|
deletedAt: null,
|
||||||
|
teamUser: {
|
||||||
|
some: {
|
||||||
|
userId,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user