Skip to content

Instantly share code, notes, and snippets.

@xingrz
Last active August 29, 2015 13:56
Show Gist options
  • Save xingrz/9090325 to your computer and use it in GitHub Desktop.
Save xingrz/9090325 to your computer and use it in GitHub Desktop.
XX-Style
var router = require('xx').router
, marked = require('marked')
exports.create = router()
.shouldAuthed()
.shouldNotContains([ 'id', 'creator' ])
exports.show = router()
.visable([ 'title', 'content' ])
.map('content', marked.render)
exports.modify = router()
.shouldAuthed()
.shouldNotContains([ 'id', 'creator' ])
exports.remove = router.unauthorized()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment