From 5b5ad116767a8aec64085be7d6ff99ee6a522388 Mon Sep 17 00:00:00 2001 From: Oliver Akins Date: Sun, 14 Aug 2022 13:50:30 -0600 Subject: [PATCH] Make the Nightbot headers required when included --- src/schemas/nightbot.ts | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/schemas/nightbot.ts b/src/schemas/nightbot.ts index c9f5996..4305152 100644 --- a/src/schemas/nightbot.ts +++ b/src/schemas/nightbot.ts @@ -3,19 +3,11 @@ import Joi from "joi"; export const nightbotCustomHeadersSchema = Joi.object({ "nightbot-response-url": Joi .string() - .uri({ scheme: `https` }) - .optional(), + .uri({ scheme: `https` }), "nightbot-user": Joi - .string() - .optional(), + .string(), "nightbot-channel": Joi - .string() - .optional(), + .string(), }) -.and( - "nightbot-response-url", - "nightbot-user", - "nightbot-channel", -) .meta({ className: `nightbotCustomHeaders` }) .description(`The custom headers Nightbot makes requests with`); \ No newline at end of file