add properties which are present when previewing an existing query

This commit is contained in:
Maurits Lourens 2022-02-10 10:22:57 +01:00 committed by mike12345567
parent f86222a98d
commit 88383eabf1
1 changed files with 3 additions and 0 deletions

View File

@ -31,6 +31,9 @@ exports.generateQueryValidation = () => {
exports.generateQueryPreviewValidation = () => { exports.generateQueryPreviewValidation = () => {
// prettier-ignore // prettier-ignore
return joiValidator.body(Joi.object({ return joiValidator.body(Joi.object({
_id: Joi.string().optional(),
_rev: Joi.string().optional(),
readable: Joi.boolean().optional(),
fields: Joi.object().required(), fields: Joi.object().required(),
queryVerb: Joi.string().allow().required(), queryVerb: Joi.string().allow().required(),
name: Joi.string().required(), name: Joi.string().required(),