diff --git a/server/src/routes/posts.ts b/server/src/routes/posts.ts index 4b148e1f..9ec882b9 100644 --- a/server/src/routes/posts.ts +++ b/server/src/routes/posts.ts @@ -37,7 +37,8 @@ posts.post( .required(), userId: Joi.string().required(), password: Joi.string().optional(), - expiresAt: Joi.date().optional() + // expiresAt, allow to be null + expiresAt: Joi.date().optional().allow(null, '') } }), async (req, res, next) => {