couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chewbra...@apache.org
Subject chttpd commit: updated refs/heads/1993-bigcouch-couch-mrview to 059a03a
Date Fri, 28 Feb 2014 19:30:31 GMT
Repository: couchdb-chttpd
Updated Branches:
  refs/heads/1993-bigcouch-couch-mrview b78d2e78c -> 059a03ab4


Update design info API response to match CouchDB master


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

Branch: refs/heads/1993-bigcouch-couch-mrview
Commit: 059a03ab49b3aa7991b5b8d3518be7cf51357872
Parents: b78d2e7
Author: Russell Branca <chewbranca@apache.org>
Authored: Fri Feb 28 11:27:45 2014 -0800
Committer: Russell Branca <chewbranca@apache.org>
Committed: Fri Feb 28 11:27:45 2014 -0800

----------------------------------------------------------------------
 src/chttpd_db.erl | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/059a03ab/src/chttpd_db.erl
----------------------------------------------------------------------
diff --git a/src/chttpd_db.erl b/src/chttpd_db.erl
index 742c09b..c8f7556 100644
--- a/src/chttpd_db.erl
+++ b/src/chttpd_db.erl
@@ -163,10 +163,11 @@ handle_design_req(Req, Db) ->
 bad_action_req(#httpd{path_parts=[_, _, Name|FileNameParts]}=Req, Db, _DDoc) ->
     db_attachment_req(Req, Db, <<"_design/",Name/binary>>, FileNameParts).
 
-handle_design_info_req(#httpd{method='GET'}=Req, Db, #doc{id=Id} = DDoc) ->
+handle_design_info_req(#httpd{method='GET'}=Req, Db, #doc{} = DDoc) ->
+    [_, _, Name, _] = Req#httpd.path_parts,
     {ok, GroupInfoList} = fabric:get_view_group_info(Db, DDoc),
     send_json(Req, 200, {[
-        {name,  Id},
+        {name,  Name},
         {view_index, {GroupInfoList}}
     ]});
 


Mime
View raw message