sanitize before validation

This commit is contained in:
Daniel Lugo 2020-06-24 17:05:06 -04:00
parent 6fb804701c
commit b4c22228ec

View file

@ -50,7 +50,6 @@ const getWallPage = async page => {
})
)
if (Common.Schema.isWallPage(thePage)) {
const clean = {
...thePage
}
@ -62,10 +61,7 @@ const getWallPage = async page => {
}
})
return thePage
}
return empty
return Common.Schema.isWallPage(clean) ? clean : empty
}
module.exports = {