couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chewbra...@apache.org
Subject [1/4] couch commit: updated refs/heads/master to eb60e41
Date Mon, 12 Oct 2015 22:02:38 GMT
Repository: couchdb-couch
Updated Branches:
  refs/heads/master 75cfed07b -> eb60e41ad


Whitespace and housekeeping


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/c0822a7e
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/c0822a7e
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/c0822a7e

Branch: refs/heads/master
Commit: c0822a7ecb7fbf34dd2bd67a019580ff32bf8e6b
Parents: 62994cc
Author: Russell Branca <chewbranca@apache.org>
Authored: Mon Oct 12 19:26:30 2015 +0000
Committer: Russell Branca <chewbranca@apache.org>
Committed: Mon Oct 12 22:01:14 2015 +0000

----------------------------------------------------------------------
 src/couch_query_servers.erl | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/c0822a7e/src/couch_query_servers.erl
----------------------------------------------------------------------
diff --git a/src/couch_query_servers.erl b/src/couch_query_servers.erl
index 34c54d0..92ba3a3 100644
--- a/src/couch_query_servers.erl
+++ b/src/couch_query_servers.erl
@@ -273,14 +273,13 @@ get_number(Key, Props) ->
 validate_doc_update(DDoc, EditDoc, DiskDoc, Ctx, SecObj) ->
     JsonEditDoc = couch_doc:to_json_obj(EditDoc, [revs]),
     JsonDiskDoc = json_doc(DiskDoc),
-    Resp = ddoc_prompt(DDoc,
-                       [<<"validate_doc_update">>],
-                       [JsonEditDoc, JsonDiskDoc, Ctx, SecObj]),
-    case Resp of
-        _ when Resp /= 1 ->
-            couch_stats:increment_counter(
-                [couchdb, query_server, vdu_rejects], 1);
-        _ -> ok
+    Resp = ddoc_prompt(
+        DDoc,
+        [<<"validate_doc_update">>],
+        [JsonEditDoc, JsonDiskDoc, Ctx, SecObj]
+    ),
+    if Resp == 1 -> ok; true ->
+        couch_stats:increment_counter([couchdb, query_server, vdu_rejects], 1)
     end,
     case Resp of
         1 ->
@@ -316,10 +315,10 @@ filter_view(DDoc, VName, Docs) ->
 
 filter_docs(Req, Db, DDoc, FName, Docs) ->
     JsonReq = case Req of
-    {json_req, JsonObj} ->
-        JsonObj;
-    #httpd{} = HttpReq ->
-        couch_httpd_external:json_req_obj(HttpReq, Db)
+        {json_req, JsonObj} ->
+            JsonObj;
+        #httpd{} = HttpReq ->
+            couch_httpd_external:json_req_obj(HttpReq, Db)
     end,
     Options = json_doc_options(),
     JsonDocs = [json_doc(Doc, Options) || Doc <- Docs],


Mime
View raw message