apply same for min in schema dates

This commit is contained in:
Thomas Ruoff
2020-11-09 22:55:11 +01:00
parent cd6ae123bb
commit 10ed86e61f

View File

@@ -49,13 +49,13 @@ const BookingSchema = new mongoose.Schema<BookingDocument>(
type: Date, type: Date,
required: true, required: true,
get: dateFormatBackend, get: dateFormatBackend,
min: new Date(), min: nowInTz(),
}, },
endDate: { endDate: {
type: Date, type: Date,
required: false, required: false,
get: dateFormatBackend, get: dateFormatBackend,
min: new Date(), min: nowInTz(),
}, },
days: { days: {
type: [String], type: [String],