Update packages/server/src/api/routes/utils/validators.ts

Co-authored-by: Sam Rose <hello@samwho.dev>
This commit is contained in:
Peter Clement 2024-09-03 21:14:05 +01:00 committed by GitHub
parent 93aba3ed22
commit f6f6120e70
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -91,7 +91,8 @@ export function datasourceValidator() {
)
}
function filterObject(unknown = true) {
function filterObject(opts?: { unknown: boolean }) {
const { unknown = true } = opts || {}
const conditionalFilteringObject = () =>
Joi.object({
conditions: Joi.array().items(Joi.link("#schema")).required(),