fix: use joi positive and integer validators on HD_MAX_DOCUMENT_LENGTH

validate HD_MAX_DOCUMENT_LENGTH with the positive and integer validators of Joi.

See also:
- https://joi.dev/api/#numberpositive
- https://joi.dev/api/#numberinteger

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2022-03-05 00:26:04 +01:00
parent de8bad13cf
commit 96747b6d68

View file

@ -21,6 +21,8 @@ const schema = Joi.object({
.label('HD_FORBIDDEN_NOTE_IDS'),
maxDocumentLength: Joi.number()
.default(100000)
.positive()
.integer()
.optional()
.label('HD_MAX_DOCUMENT_LENGTH'),
});