Fix
parent
b661e5511f
commit
9c1e71640e
|
@ -9,6 +9,7 @@ const bodyValidation=(schema,body)=>{
|
|||
exports.checkKeyMatch=(arr1, arr2,section="Body")=> {
|
||||
// Iterate over each object in arr1
|
||||
var errors=[]
|
||||
if(arr1){
|
||||
for (let obj1 of arr1) {
|
||||
if (obj1.required) {
|
||||
let key = obj1.itemName.toLowerCase()
|
||||
|
@ -46,6 +47,7 @@ exports.checkKeyMatch=(arr1, arr2,section="Body")=> {
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return errors; //
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue