Skip to content

Commit

Permalink
Make place availabilityEnd nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
timokoenig committed Apr 14, 2022
1 parent bcdf22a commit 77ab0d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pages/api/place/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type RequestBody = {
houseRules?: string
arrivalInstructions?: string
availabilityStart: Date
availabilityEnd?: Date
availabilityEnd?: Date | null
}

interface Request extends NextApiRequest {
Expand All @@ -55,7 +55,7 @@ const validationSchemaPets = Yup.object()
addressCity: Yup.string().min(1).max(100).required(),
phoneNumber: Yup.string().min(1).max(100).required(),
availabilityStart: Yup.date().required(),
availabilityEnd: Yup.date().optional(),
availabilityEnd: Yup.date().nullable().optional(),
})
.noUnknown()

Expand Down Expand Up @@ -83,7 +83,7 @@ const validationSchemaPeople = Yup.object()
houseRules: Yup.string().max(5000),
arrivalInstructions: Yup.string().max(5000),
availabilityStart: Yup.date().required(),
availabilityEnd: Yup.date().optional(),
availabilityEnd: Yup.date().nullable().optional(),
})
.noUnknown()

Expand Down

0 comments on commit 77ab0d7

Please sign in to comment.