fix: event type filter by team (#10632)
Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>pull/10546/head
parent
9c7d0ea604
commit
8bdd835a68
|
@ -301,12 +301,12 @@ export const getByViewerHandler = async ({ ctx, input }: GetByViewerOptions) =>
|
||||||
|
|
||||||
export function getPrismaWhereUserIdFromFilter(
|
export function getPrismaWhereUserIdFromFilter(
|
||||||
userId: number,
|
userId: number,
|
||||||
filters: NonNullable<TEventTypeInputSchema>["filters"]
|
filters: NonNullable<TEventTypeInputSchema>["filters"] | undefined
|
||||||
) {
|
) {
|
||||||
if (!filters || !hasFilter(filters)) {
|
if (!filters || !hasFilter(filters)) {
|
||||||
return userId;
|
return userId;
|
||||||
} else if (filters.userIds?.[0] === userId) {
|
} else if (filters.userIds?.[0] === userId) {
|
||||||
return userId;
|
return userId;
|
||||||
}
|
}
|
||||||
return null;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue