From 25a0fbeaee3a5ae5f98ef57844e360bcc3188824 Mon Sep 17 00:00:00 2001 From: Andrew Mihailov Date: Sun, 31 Jan 2016 20:51:32 +0200 Subject: [PATCH] parse request.where from string into JSON --- classes.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/classes.js b/classes.js index d520250b02..92d2a220ee 100644 --- a/classes.js +++ b/classes.js @@ -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) => {