incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominic Laflamme <flam...@gmail.com>
Subject error with an update handler that inserts documents
Date Mon, 25 Feb 2013 16:18:45 GMT
Hello,
I am using an update handler to insert new documents. 

the following works fine in 1.2.0 and 0.10.0, but no longer works in 1.2.1


function(doc,req) { 
var data = JSON.parse(req.body); 
data[\'_id\'] = data.UniqueID;
if ( data.timestamp == null ) 
{
data.timestamp = new Date().getTime();
} 
return [ data, JSON.stringify(data)]}");


this returns "bad return value".

any ideas?






Mime
View raw message