Remove message properties that were causing problems
This commit is contained in:
parent
13711e5986
commit
b883c00247
1 changed files with 18 additions and 20 deletions
|
|
@ -4,32 +4,31 @@ import Joi from "joi";
|
|||
|
||||
const schema = Joi.object({
|
||||
game: Joi.object({
|
||||
type: Joi
|
||||
.string()
|
||||
.allow(
|
||||
`file:json`,
|
||||
// `file:csv`,
|
||||
// `web:json`,
|
||||
// `web:csv`
|
||||
)
|
||||
.required()
|
||||
.message(`Invalid deck type`),
|
||||
location: Joi
|
||||
.string()
|
||||
.required()
|
||||
.message(`The deck location must be a string`),
|
||||
code_length: Joi.number().integer().positive(),
|
||||
fuel_deck: Joi.object({
|
||||
type: Joi
|
||||
.string()
|
||||
.allow(
|
||||
`file:json`,
|
||||
// `file:csv`,
|
||||
// `web:json`,
|
||||
// `web:csv`
|
||||
)
|
||||
.required(),
|
||||
location: Joi
|
||||
.string()
|
||||
.required(),
|
||||
}),
|
||||
}),
|
||||
server: Joi.object({
|
||||
port: Joi
|
||||
.number()
|
||||
.port()
|
||||
.required()
|
||||
.message(`Invalid port number`),
|
||||
.required(),
|
||||
cors: Joi.object({
|
||||
origins: Joi
|
||||
.array()
|
||||
.items(Joi.string())
|
||||
.message(`The CORS origins must be an array of strings`),
|
||||
.items(Joi.string()),
|
||||
}),
|
||||
}),
|
||||
log: Joi.object({
|
||||
|
|
@ -45,8 +44,7 @@ const schema = Joi.object({
|
|||
`fatal`
|
||||
)
|
||||
.optional()
|
||||
.default(`info`)
|
||||
.message(`Invalid log level`),
|
||||
.default(`info`),
|
||||
}),
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue