couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hank Knight <>
Subject CouchDB: Trouble with update handler
Date Mon, 29 Jul 2013 01:19:20 GMT
My update handler is here: (please click on the link)

  updates: {
    function (doc, req) {
      doc.ts = 123;
      doc.hello = 'world';
      return [doc, toJSON(doc)];

When adding documents or updating documents, I want the value of
"hello" to always be "world" and I want the value of "ts" to be 123.

This is how I add a document:

curl -X POST -d
-H "Content-Type: application/json"

The values for "hello" and "ts" remain unchanged.

What step am I missing or doing wrong?

That database is live and available for testing.

View raw message