Skip to content

Commit

Permalink
Allow seatsPerTimeSlot and seatsShowAttendees in event type calls (#216)
Browse files Browse the repository at this point in the history
This PR allows `seatsPerTimeSlot` and `seatsShowAttendees` in event type
POST and PATCH calls
  • Loading branch information
joeauyeung committed Dec 15, 2022
1 parent c129586 commit 5d892df
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/validations/event-type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ const schemaEventTypeCreateParams = z
length: z.number().int(),
metadata: z.any().optional(),
recurringEvent: recurringEventInputSchema.optional(),
seatsPerTimeSlot: z.number().optional(),
seatsShowAttendees: z.boolean().optional(),
})
.strict();

Expand All @@ -68,6 +70,8 @@ const schemaEventTypeEditParams = z
title: z.string().optional(),
slug: z.string().optional(),
length: z.number().int().optional(),
seatsPerTimeSlot: z.number().optional(),
seatsShowAttendees: z.boolean().optional(),
})
.strict();

Expand Down Expand Up @@ -103,6 +107,8 @@ export const schemaEventTypeReadPublic = EventType.pick({
description: true,
locations: true,
metadata: true,
seatsPerTimeSlot: true,
seatsShowAttendees: true,
}).merge(
z.object({
locations: z
Expand Down
1 change: 1 addition & 0 deletions pages/api/event-types/_post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { schemaEventTypeCreateBodyParams, schemaEventTypeReadPublic } from "~/li
* slug:
* type: string
* example: my-event
*
* tags:
* - event-types
* externalDocs:
Expand Down

0 comments on commit 5d892df

Please sign in to comment.