couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Couchdb Wiki] Update of "Document_Update_Validation" by BenjaminYoung
Date Fri, 14 Oct 2011 20:29:48 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The "Document_Update_Validation" page has been changed by BenjaminYoung:
http://wiki.apache.org/couchdb/Document_Update_Validation?action=diff&rev1=6&rev2=7

Comment:
added parens around throw

  {
     "_id": "_design/myview",
     "validate_doc_update": "function(newDoc, oldDoc, userCtx, secObj) {
-       if(newDoc.address === undefined) {
+       if (newDoc.address === undefined) {
-          throw {forbidden: 'Document must have an address.'};
+          throw({forbidden: 'Document must have an address.'});
        }"
  }
  }}}

Mime
View raw message