From ae7e05b267608f5eb78aa65c97817f445069a23f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stefan=20K=C3=B6gl?= Date: Tue, 15 Jul 2014 10:27:53 +0200 Subject: [PATCH] [Migration] remove unused validate_doc_update.js Podcasts are no longer updated in CouchDB, so nothing needs to be validated. --- .../_design/podcasts/validate_doc_update.js | 57 ---------------------- 1 file changed, 57 deletions(-) delete mode 100644 couchdb/general/_design/podcasts/validate_doc_update.js diff --git a/couchdb/general/_design/podcasts/validate_doc_update.js b/couchdb/general/_design/podcasts/validate_doc_update.js deleted file mode 100644 index 1c33dbdc..00000000 --- a/couchdb/general/_design/podcasts/validate_doc_update.js +++ /dev/null @@ -1,57 +0,0 @@ -function(newDoc, oldDoc, userCtx) -{ - function require(doc, field, message) - { - message = message || "Document must have a " + field; - if (doc[field] == void 0 || doc[field] == null || doc[field].length == 0) - { - throw({forbidden: message}); - } - } - - function check(cond, message) - { - message = message || "Condition check failed"; - if(!cond) - { - throw({forbidden: message}); - } - } - - function checkPodcast(podcast) - { - last_timestamp = null; - if(podcast.subscribers) - { - for(var i=0, len=podcast.subscribers.length; sub=podcast.subscribers[i], i