fixing json serialization

This commit is contained in:
Max Ogden 2011-07-20 11:45:01 -07:00
parent ffeb290423
commit 8fbbe2f848
2 changed files with 1 additions and 2 deletions

View File

@ -11,7 +11,6 @@
};
couch.request = function(opts) {
if (opts.data && typeof(opts.data === "object")) opts.data = JSON.stringify(opts.data);
var ajaxOpts = $.extend({}, defaults, opts);
return $.ajax(ajaxOpts).promise();
}

View File

@ -50,7 +50,7 @@ app.after = {
});
doc[header] = cell.parents('.data-table-cell-editor').find('.data-table-cell-editor-editor').val();
util.notify("Updating row...", {persist: true, loader: true});
couch.request({type: "PUT", url: app.baseURL + "api/" + doc._id, data: doc}).then(function(response) {
couch.request({type: "PUT", url: app.baseURL + "api/" + doc._id, data: JSON.stringify(doc)}).then(function(response) {
util.notify("Row updated successfully");
removalist.fetchRows(false, app.offset);
})