4da68597f7
Since we are about to release it's time to finally fix our linting. This patch basically runs eslint --fix and does some further manual fixes. Also it sets up eslint to fail on every warning on order to make warnings visable in the CI process. There should no functional change be introduced. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
28 lines
908 B
JavaScript
28 lines
908 B
JavaScript
'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.newNote)
|
|
// post new note with content
|
|
noteRouter.post('/new', markdownParser, response.newNote)
|
|
// 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)
|