diff options
author | BoHong Li | 2017-04-12 05:56:20 +0800 |
---|---|---|
committer | Raccoon Li | 2017-05-08 19:24:38 +0800 |
commit | 689bade73046ba2c35af59d7a65824a441b14a65 (patch) | |
tree | 9d2397d1f8c6ce73c9ee9d81ce7f1f2508557a03 /app.js | |
parent | e2ac73f5a36310dead9e23f46004ccef909f317b (diff) |
refactor(app.js): Extract note action
Diffstat (limited to '')
-rw-r--r-- | app.js | 21 |
1 files changed, 4 insertions, 17 deletions
@@ -280,23 +280,10 @@ app.post('/uploadimage', function (req, res) { } }) }) -// get new note -app.get('/new', response.newNote) -// get publish note -app.get('/s/:shortid', response.showPublishNote) -// publish note actions -app.get('/s/:shortid/:action', response.publishNoteActions) -// get publish slide -app.get('/p/:shortid', response.showPublishSlide) -// publish slide actions -app.get('/p/:shortid/:action', response.publishSlideActions) -// get note by id -app.get('/:noteId', response.showNote) -// note actions -app.get('/:noteId/:action', response.noteActions) -// note actions with action id -app.get('/:noteId/:action/:actionId', response.noteActions) -// response not found if no any route matches + +app.use(require('./lib/web/noteRoute')) + +// response not found if no any route matxches app.get('*', function (req, res) { response.errorNotFound(res) }) |