fix: Booker fix for team + user with same event + event slug (#9654)

Co-authored-by: Hariom Balhara <[email protected]>
This commit is contained in:
Jeroen ReumkensandHariom Balhara authored and GitHub committed 2023-06-21 13:01:55 +05:30
1 parent b070cfb227
commit ab6781cd72
9 files changed
+86 -22

No files matched your search

@@ -10,6 +10,6 @@ interface EventHandlerOptions {
}
export const eventHandler = async ({ ctx, input }: EventHandlerOptions) => {
const event = await getPublicEvent(input.username, input.eventSlug, ctx.prisma);
const event = await getPublicEvent(input.username, input.eventSlug, input.isTeamEvent, ctx.prisma);
return event;
};
@@ -3,6 +3,7 @@ import z from "zod";
export const ZEventInputSchema = z.object({
username: z.string(),
eventSlug: z.string(),
isTeamEvent: z.boolean().optional(),
});
export type TEventInputSchema = z.infer<typeof ZEventInputSchema>;