From 76e7bb801320988fd6f3fc6522dbcff0eabc3aff Mon Sep 17 00:00:00 2001 From: Max Leiter Date: Wed, 30 Mar 2022 20:12:41 -0700 Subject: [PATCH] server: allow expiresAt to be null for new posts --- server/src/routes/posts.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/src/routes/posts.ts b/server/src/routes/posts.ts index 4b148e1..9ec882b 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) => {