summaryrefslogtreecommitdiff
path: root/src/mango/src/mango_httpd.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/mango/src/mango_httpd.erl')
-rw-r--r--src/mango/src/mango_httpd.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mango/src/mango_httpd.erl b/src/mango/src/mango_httpd.erl
index 9a5c266db..d9589b3e8 100644
--- a/src/mango/src/mango_httpd.erl
+++ b/src/mango/src/mango_httpd.erl
@@ -208,6 +208,7 @@ handle_partition_explain_req(#httpd{method='POST'}=Req, Db, Partition) ->
chttpd:validate_ctype(Req, "application/json"),
{ok, Body} = add_partition_to_query(Req, Partition),
{ok, Opts0} = mango_opts:validate_find(Body),
+ ok = mango_opts:validate_partition(Body),
{value, {selector, Sel}, Opts} = lists:keytake(selector, 1, Opts0),
Resp = mango_crud:explain(Db, Sel, Opts),
chttpd:send_json(Req, Resp);
@@ -234,6 +235,7 @@ handle_partition_find_req(#httpd{method='POST'}=Req, Db, Partition) ->
chttpd:validate_ctype(Req, "application/json"),
{ok, Body} = add_partition_to_query(Req, Partition),
{ok, Opts0} = mango_opts:validate_find(Body),
+ ok = mango_opts:validate_partition(Body),
{value, {selector, Sel}, Opts} = lists:keytake(selector, 1, Opts0),
{ok, Resp0} = start_find_resp(Req),
{ok, AccOut} = run_find(Resp0, Db, Sel, Opts),