couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ning Tan <ning...@gmail.com>
Subject Re: Do change notification (filters) support HTTP verbs other than GET?
Date Thu, 08 Apr 2010 12:46:23 GMT
On Thu, Apr 8, 2010 at 8:41 AM, Ning Tan <ningtan@gmail.com> wrote:
> My filter function is
>
> function(doc, req)
> {
>   return true;
> }
>
> :-)

What I meant is that I'm even having the hanging problem with the
above barebones function. The actual function I wrote earlier was:

function (doc, req)
{
	// !code lib/json/json2.js

	var found = false;
	
	if (req.query.oids)
	{
		var oids = JSON.parse(req.query.oids);
		var found = oids.indexOf(doc._id) >= 0;
	}
	
	return found;
}

json2.js was taken from Crockford website.

Mime
View raw message