1
0
Fork 0
mirror of synced 2024-09-20 03:08:18 +12:00

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

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(),