Update channels.js

This commit is contained in:
Aleksandr Statciuk 2022-02-19 06:18:41 +03:00
parent 5b37aa3b58
commit 9bc11e2f6c

View file

@ -18,11 +18,15 @@ module.exports = {
.regex(/^[\sa-zA-Z\u00C0-\u00FF0-9'-]+$/) .regex(/^[\sa-zA-Z\u00C0-\u00FF0-9'-]+$/)
.allow(null), .allow(null),
broadcast_area: Joi.array().items( broadcast_area: Joi.array().items(
Joi.string().regex(/^(s\/[A-Z]{2}-[A-Z0-9]{1,3}|c\/[A-Z]{2}|r\/[A-Z0-9]{3,7})$/) Joi.string()
.regex(/^(s\/[A-Z]{2}-[A-Z0-9]{1,3}|c\/[A-Z]{2}|r\/[A-Z0-9]{3,7})$/)
.required()
),
languages: Joi.array().items(
Joi.string()
.regex(/^[a-z]{3}$/)
.required()
), ),
languages: Joi.array()
.items(Joi.string().regex(/^[a-z]{3}$/))
.allow(''),
categories: Joi.array().items(Joi.string().regex(/^[a-z]+$/)), categories: Joi.array().items(Joi.string().regex(/^[a-z]+$/)),
is_nsfw: Joi.boolean().strict().required(), is_nsfw: Joi.boolean().strict().required(),
logo: Joi.string().uri().allow(null) logo: Joi.string().uri().allow(null)