From 6ae587db02005036a074bc512187b8c035c6829a Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Fri, 23 Sep 2022 04:03:49 +0300 Subject: [PATCH] Update channels.js --- scripts/db/schemes/channels.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/db/schemes/channels.js b/scripts/db/schemes/channels.js index 0c6a70ec..09ed9f00 100644 --- a/scripts/db/schemes/channels.js +++ b/scripts/db/schemes/channels.js @@ -35,7 +35,7 @@ module.exports = { categories: Joi.array().items(Joi.string().regex(/^[a-z]+$/)), is_nsfw: Joi.boolean().strict().required(), launched: Joi.date().format('YYYY-MM-DD').raw().allow(null), - closed: Joi.date().format('YYYY-MM-DD').raw().allow(null), + closed: Joi.date().format('YYYY-MM-DD').raw().allow(null).greater(Joi.ref('launched')), replaced_by: Joi.string() .regex(/^[A-Za-z0-9]+\.[a-z]{2}$/) .allow(null),