ndjson-to-couchdb
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -20,2 +20,3 @@ var couchr = require('couchr'); | ||
var update = function(){ | ||
var prev_rev = obj._rev; | ||
couchr[req_opts.method].call(null, req_opts.uri, obj, function(err, resp){ | ||
@@ -25,2 +26,3 @@ if (err) return cb(err); | ||
obj._id = resp.id; | ||
if (config.prev_rev_field) obj[config.prev_rev_field] = prev_rev; | ||
obj._rev = resp.rev; | ||
@@ -45,3 +47,3 @@ cb(null, obj); | ||
if (resp.headers.etag) obj._rev = JSON.parse(resp.headers.etag); | ||
if (config.prev_rev_field) obj[config.prev_rev_field] = obj._rev; | ||
} catch(e){} | ||
@@ -48,0 +50,0 @@ cb() |
{ | ||
"name": "ndjson-to-couchdb", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Stream ndjson to couchdb", | ||
@@ -5,0 +5,0 @@ "bin": "bin/cli.js", |
3268
61