Permalink
Browse files

Fixed a bug in db.remove() that caused a 'bad request' error.

  • Loading branch information...
slaskis committed Mar 15, 2012
1 parent ca5fb97 commit fc9032622e735cfa9a72f335d8dd157a40c95d6e
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/clerk/database.document.js
@@ -350,13 +350,13 @@ exports.remove = function(that, rev, callback) {
});
} else {
// map of ids to revisions to delete
- for (id in that) {
+ for (var id in that) {
body.push({ _id: id, _rev: that[id], _deleted: true });
}
}
// bulk delete
- this.request('POST', '_bulk_docs', null, body, callback);
+ this.request('POST', '_bulk_docs', null, {docs:body}, callback);
};

0 comments on commit fc90326

Please sign in to comment.