fixing json serialization
This commit is contained in:
parent
ffeb290423
commit
8fbbe2f848
@ -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();
|
||||
}
|
||||
|
||||
@ -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);
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user