You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2018/03/26 20:55:40 UTC

[couchdb] 09/33: WIP - couch_httpd_db.erl

This is an automated email from the ASF dual-hosted git repository.

davisp pushed a commit to branch COUCHDB-3326-clustered-purge-davisp-refactor
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 0486f0a8577178a60869ae7e635f3d95baf5ca75
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Mon Mar 26 10:26:27 2018 -0500

    WIP - couch_httpd_db.erl
---
 src/couch/src/couch_httpd_db.erl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/couch/src/couch_httpd_db.erl b/src/couch/src/couch_httpd_db.erl
index b407c02..27f7d70 100644
--- a/src/couch/src/couch_httpd_db.erl
+++ b/src/couch/src/couch_httpd_db.erl
@@ -379,15 +379,15 @@ db_req(#httpd{method='POST',path_parts=[_,<<"_purge">>]}=Req, Db) ->
     couch_stats:increment_counter([couchdb, httpd, purge_requests]),
     couch_httpd:validate_ctype(Req, "application/json"),
     {IdRevs} = couch_httpd:json_body_obj(Req),
-    PurgeReqs = lists:map(fun({Id, JsonRevs} ->
-        {couch_uuids:new(), Id, couch_doc:parse_revs(Revs)}
+    PurgeReqs = lists:map(fun({Id, JsonRevs}) ->
+        {couch_uuids:new(), Id, couch_doc:parse_revs(JsonRevs)}
     end, IdRevs),
 
     {ok, Replies} = couch_db:purge_docs(Db, PurgeReqs),
 
     Results = lists:zipwith(fun({{Id, _}, Reply}) ->
         {Id, couch_doc:revs_to_strs(Reply)}
-    end, IdRevs, PurgeReqs),
+    end, IdRevs, Replies),
 
     {ok, Db2} = couch_db:reopen(Db),
     {ok, PurgeSeq} = couch_db:get_purge_seq(Db2),

-- 
To stop receiving notification emails like this one, please contact
davisp@apache.org.