function(doc, req) {
	// only allow putting new text, not updating old text
	if (doc) return [null, {
		code: 409,
		body: "conflict"
	}];

	var text = req.body;
	var doc = {
		_id: (new Date()/1000).toString(),
		text: text
	};
	return [doc, "ok"];
}

@@ -18,154 +18,19 @@
 ) %7B%0A
-%09// only allow putting new text, not updating old text%0A
 %09if (
+!
 doc) 
-return %5Bnull, %7B%0A%09%09code: 409,%0A%09%09body: %22conflict%22%0A%09%7D%5D;%0A%0A%09var text = req.body;%0A%09var 
 doc 
@@ -39,16 +39,26 @@
 %7B%0A%09%09_id:
+ req.id %7C%7C
  (new Da
@@ -82,25 +82,33 @@
 ng()
-,
 %0A%09
-%09text: text%0A%09%7D
+%7D;%0A%09doc.text = req.body
 ;%0A%09r

Allow updating old text with _update/add_text