DDoc is a #doc{} not a {[]}
BugzID: 17515
Project: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/commit/de6ab303
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/tree/de6ab303
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/diff/de6ab303
Branch: refs/heads/import
Commit: de6ab303c628d6209ec2c3ddf378d6c8fb1c62ce
Parents: 97ad357
Author: Adam Kocoloski <[email protected]>
Authored: Fri Feb 22 15:07:11 2013 -0500
Committer: Robert Newson <[email protected]>
Committed: Wed Mar 6 12:23:14 2013 -0600
----------------------------------------------------------------------
src/chttpd_show.erl | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/de6ab303/src/chttpd_show.erl
----------------------------------------------------------------------
diff --git a/src/chttpd_show.erl b/src/chttpd_show.erl
index 670d7b3..b028f4c 100644
--- a/src/chttpd_show.erl
+++ b/src/chttpd_show.erl
@@ -77,7 +77,7 @@ handle_doc_show(Req, Db, DDoc, ShowName, Doc) ->
handle_doc_show(Req, Db, DDoc, ShowName, Doc, DocId) ->
%% Will throw an exception if the _show handler is missing
- couch_util:get_nested_json_value(DDoc, [<<"shows">>, ShowName]),
+ couch_util:get_nested_json_value(DDoc#doc.body, [<<"shows">>, ShowName]),
% get responder for ddoc/showname
CurrentEtag = show_etag(Req, Doc, DDoc, []),
chttpd:etag_respond(Req, CurrentEtag, fun() ->
@@ -122,7 +122,7 @@ handle_doc_update_req(Req, _Db, _DDoc) ->
send_doc_update_response(Req, Db, DDoc, UpdateName, Doc, DocId) ->
%% Will throw an exception if the _update handler is missing
- couch_util:get_nested_json_value(DDoc, [<<"updates">>, UpdateName]),
+ couch_util:get_nested_json_value(DDoc#doc.body, [<<"updates">>,
UpdateName]),
JsonReq = chttpd_external:json_req_obj(Req, Db, DocId),
JsonDoc = couch_query_servers:json_doc(Doc),
Cmd = [<<"updates">>, UpdateName],
@@ -188,7 +188,7 @@ handle_view_list_req(Req, _Db, _DDoc) ->
handle_view_list(Req, Db, DDoc, LName, {ViewDesignName, ViewName}, Keys) ->
%% Will throw an exception if the _list handler is missing
- couch_util:get_nested_json_value(DDoc, [<<"lists">>, LName]),
+ couch_util:get_nested_json_value(DDoc#doc.body, [<<"lists">>, LName]),
{ok, VDoc} = fabric:open_doc(Db, <<"_design/", ViewDesignName/binary>>,
[]),
Group = couch_view_group:design_doc_to_view_group(VDoc),
IsReduce = chttpd_view:get_reduce_type(Req),