From 568b798126654d0c9dfe964323df2aa5f6b9233b Mon Sep 17 00:00:00 2001 From: "Damien F. Katz" Date: Mon, 19 May 2008 19:28:19 +0000 Subject: fix to submit temp view src as json git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@657930 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/jquery.couch.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'share/www/script/jquery.couch.js') diff --git a/share/www/script/jquery.couch.js b/share/www/script/jquery.couch.js index 00090619..695b0f11 100644 --- a/share/www/script/jquery.couch.js +++ b/share/www/script/jquery.couch.js @@ -179,7 +179,9 @@ fun = fun.toSource ? fun.toSource() : "(" + fun.toString() + ")"; $.ajax({ type: "POST", url: this.uri + "_temp_view" + encodeOptions(options), - contentType: "javascript", data: fun, dataType: "json", + contentType: "application/json", + data: toJSON({language:"javascript", map:fun}), + dataType: "json", complete: function(req) { var resp = $.httpData(req, "json"); if (req.status == 200 && options.success) { -- cgit v1.2.3