Fix most glaring bugs and vulnerabilities

This commit is contained in:
Luka Romih
2023-05-08 23:25:25 +02:00
parent 9867875ef2
commit d0e53fee3b
144 changed files with 2231 additions and 2981 deletions
-8
View File
@@ -3,20 +3,12 @@ const router = require('express-promise-router')()
const {
listComments,
createComment,
seedComments,
clearComments,
updateStatus
} = require('../../../controllers/api/v1/comments')
// List comments (one page).
router.get('/', listComments)
// TEMP - Seed comments.
router.get('/seed/:commentCount', seedComments)
// TEMP - Clear comments.
router.get('/clear', clearComments)
// All further routes are only available to authenticated users.
router.use((req, res, next) => {
if (req.isAuthenticated()) return next()