From a4357335aec3e5daa68f875bdde5caa85c8584ef Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Mon, 11 Apr 2022 23:31:51 +0300 Subject: [PATCH] Update channels.js --- scripts/db/schemes/channels.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/db/schemes/channels.js b/scripts/db/schemes/channels.js index 2110e595..29b007dc 100644 --- a/scripts/db/schemes/channels.js +++ b/scripts/db/schemes/channels.js @@ -1,4 +1,4 @@ -const Joi = require('joi') +const Joi = require('joi').extend(require('@joi/date')) const path = require('path') module.exports = { @@ -33,6 +33,8 @@ 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), website: Joi.string() .uri({ scheme: ['http', 'https']