diff options
author | David Mehren | 2019-10-27 14:40:36 +0100 |
---|---|---|
committer | David Mehren | 2019-10-27 14:40:36 +0100 |
commit | 30487f7c01dc15435d86d95d24257853d7930154 (patch) | |
tree | cc34d4b2b13f0502583fc953fc3a3dba49c9d30a /lib/web/note/router.js | |
parent | afb317b55155eed2cfcad0fee5aba2107dc0b106 (diff) |
Rename actions.js to controller.js and rename functions to be more descriptive
Move postNote to NoteController and rename to createFromPost
Signed-off-by: David Mehren <dmehren1@gmail.com>
Diffstat (limited to '')
-rw-r--r-- | lib/web/note/router.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/web/note/router.js b/lib/web/note/router.js index 2a6bf2aa..39da4c2c 100644 --- a/lib/web/note/router.js +++ b/lib/web/note/router.js @@ -8,15 +8,15 @@ const { markdownParser } = require('../utils') const router = module.exports = Router() -const noteActions = require('./actions') +const noteController = require('./controller') const slide = require('./slide') // get new note -router.get('/new', response.postNote) +router.get('/new', noteController.createFromPOST) // post new note with content -router.post('/new', markdownParser, response.postNote) +router.post('/new', markdownParser, noteController.createFromPOST) // post new note with content and alias -router.post('/new/:noteId', markdownParser, response.postNote) +router.post('/new/:noteId', markdownParser, noteController.createFromPOST) // get publish note router.get('/s/:shortid', response.showPublishNote) // publish note actions @@ -28,6 +28,6 @@ router.get('/p/:shortid/:action', slide.publishSlideActions) // get note by id router.get('/:noteId', response.showNote) // note actions -router.get('/:noteId/:action', noteActions.doAction) +router.get('/:noteId/:action', noteController.doAction) // note actions with action id -router.get('/:noteId/:action/:actionId', noteActions.doAction) +router.get('/:noteId/:action/:actionId', noteController.doAction) |