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
+3 -1
View File
@@ -1,5 +1,6 @@
// This page refers to dictionary entries, not consultancy or other entries
const router = require('express-promise-router')()
const user = require('../../../middleware/user')
const {
getEntry,
@@ -10,7 +11,8 @@ const {
getEntryVersionSnapshot
} = require('../../../controllers/api/v1/dictionaries')
// TODO Add authorization.
// All further routes are only available to authenticated users with dictionary content editing rights.
router.use(user.isAuthenticated, user.canContentEdit)
// Render entry data for the selected entry
router.get('/', getEntry)