summaryrefslogtreecommitdiff
path: root/lib/web/noteRouter.js
diff options
context:
space:
mode:
authorDavid Mehren2019-10-27 13:51:53 +0100
committerDavid Mehren2019-10-27 13:51:53 +0100
commitf78540c3fbf109d6ccf2d92c5b1cf0148c88f722 (patch)
tree7f8b968b925b8b262cca0f4cd180027abc4b745e /lib/web/noteRouter.js
parent20a67e3446723231961043bffeb5a7b974e891c0 (diff)
Move note actions to their own file.
Because of circular import problems, this commit also moves the error messages from response.js to errors.js Signed-off-by: David Mehren <dmehren1@gmail.com>
Diffstat (limited to 'lib/web/noteRouter.js')
-rw-r--r--lib/web/noteRouter.js30
1 files changed, 0 insertions, 30 deletions
diff --git a/lib/web/noteRouter.js b/lib/web/noteRouter.js
deleted file mode 100644
index 58e93019..00000000
--- a/lib/web/noteRouter.js
+++ /dev/null
@@ -1,30 +0,0 @@
-'use strict'
-
-const Router = require('express').Router
-
-const response = require('../response')
-
-const { markdownParser } = require('./utils')
-
-const noteRouter = module.exports = Router()
-
-// get new note
-noteRouter.get('/new', response.postNote)
-// post new note with content
-noteRouter.post('/new', markdownParser, response.postNote)
-// post new note with content and alias
-noteRouter.post('/new/:noteId', markdownParser, response.postNote)
-// get publish note
-noteRouter.get('/s/:shortid', response.showPublishNote)
-// publish note actions
-noteRouter.get('/s/:shortid/:action', response.publishNoteActions)
-// get publish slide
-noteRouter.get('/p/:shortid', response.showPublishSlide)
-// publish slide actions
-noteRouter.get('/p/:shortid/:action', response.publishSlideActions)
-// get note by id
-noteRouter.get('/:noteId', response.showNote)
-// note actions
-noteRouter.get('/:noteId/:action', response.noteActions)
-// note actions with action id
-noteRouter.get('/:noteId/:action/:actionId', response.noteActions)