sanitize before validation
This commit is contained in:
parent
6fb804701c
commit
b4c22228ec
1 changed files with 10 additions and 14 deletions
|
|
@ -50,7 +50,6 @@ const getWallPage = async page => {
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
if (Common.Schema.isWallPage(thePage)) {
|
|
||||||
const clean = {
|
const clean = {
|
||||||
...thePage
|
...thePage
|
||||||
}
|
}
|
||||||
|
|
@ -62,10 +61,7 @@ const getWallPage = async page => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
return thePage
|
return Common.Schema.isWallPage(clean) ? clean : empty
|
||||||
}
|
|
||||||
|
|
||||||
return empty
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue