parse request.where from string into JSON

This commit is contained in:
Andrew Mihailov
2016-01-31 20:51:32 +02:00
parent 522abdf606
commit 25a0fbeaee

View File

@@ -33,6 +33,10 @@ function handleFind(req) {
options.redirectClassNameForKey = String(req.body.redirectClassNameForKey);
}
if(typeof req.body.where === 'string') {
req.body.where = JSON.parse(req.body.where);
}
return rest.find(req.config, req.auth,
req.params.className, req.body.where, options)
.then((response) => {