Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

no, it was _rev that i wasn't updating

  • Loading branch information...
commit a6e83b7a3202439e0849e65a7ef718552f9e703c 1 parent 0e6c69b
@dominictarr authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 server.js
View
6 server.js
@@ -52,10 +52,12 @@ function save (repo){
repo.saving = true
db.get('' + repo._id, function (err,doc){
- var obj = {_id: doc._id}
+
+ var obj = {}
for (var key in repo)
obj[key] = repo[key]
- delete obj._events
+ obj._rev = doc && doc._rev
+ obj.time = new Date()
db.save(obj,
function (err,data){
repo._rev = data._rev
Please sign in to comment.
Something went wrong with that request. Please try again.