Skip to content

Instantly share code, notes, and snippets.

@pegli
Last active December 19, 2015 07:38
Show Gist options
  • Save pegli/5919650 to your computer and use it in GitHub Desktop.
Save pegli/5919650 to your computer and use it in GitHub Desktop.
common kanso setup that includes a validation function
# assumes you have "load": "setup" in your kanso.json
module.exports =
views: require './views'
lists: require './lists'
validate_doc_update: (newDoc, oldDoc, userCtx, secObj) =>
if newDoc._deleted == true
throw { forbidden: 'Docs live forever!' }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment