server: allow expiresAt to be null for new posts

This commit is contained in:
Max Leiter 2022-03-30 20:12:41 -07:00
parent 47cd9cc094
commit 76e7bb8013
No known key found for this signature in database
GPG key ID: A3512F2F2F17EBDA

View file

@ -37,7 +37,8 @@ posts.post(
.required(), .required(),
userId: Joi.string().required(), userId: Joi.string().required(),
password: Joi.string().optional(), password: Joi.string().optional(),
expiresAt: Joi.date().optional() // expiresAt, allow to be null
expiresAt: Joi.date().optional().allow(null, '')
} }
}), }),
async (req, res, next) => { async (req, res, next) => {