Make the Nightbot headers required when included
This commit is contained in:
parent
78200a680d
commit
5b5ad11676
1 changed files with 3 additions and 11 deletions
|
|
@ -3,19 +3,11 @@ import Joi from "joi";
|
||||||
export const nightbotCustomHeadersSchema = Joi.object({
|
export const nightbotCustomHeadersSchema = Joi.object({
|
||||||
"nightbot-response-url": Joi
|
"nightbot-response-url": Joi
|
||||||
.string()
|
.string()
|
||||||
.uri({ scheme: `https` })
|
.uri({ scheme: `https` }),
|
||||||
.optional(),
|
|
||||||
"nightbot-user": Joi
|
"nightbot-user": Joi
|
||||||
.string()
|
.string(),
|
||||||
.optional(),
|
|
||||||
"nightbot-channel": Joi
|
"nightbot-channel": Joi
|
||||||
.string()
|
.string(),
|
||||||
.optional(),
|
|
||||||
})
|
})
|
||||||
.and(
|
|
||||||
"nightbot-response-url",
|
|
||||||
"nightbot-user",
|
|
||||||
"nightbot-channel",
|
|
||||||
)
|
|
||||||
.meta({ className: `nightbotCustomHeaders` })
|
.meta({ className: `nightbotCustomHeaders` })
|
||||||
.description(`The custom headers Nightbot makes requests with`);
|
.description(`The custom headers Nightbot makes requests with`);
|
||||||
Loading…
Add table
Add a link
Reference in a new issue