Another batch of important updates and fixes

This commit is contained in:
Luka Romih
2026-02-23 15:29:58 +01:00
parent d0e53fee3b
commit fd02e25719
40 changed files with 216 additions and 71 deletions
+2
View File
@@ -6,6 +6,8 @@ const {
updateStatus
} = require('../../../controllers/api/v1/comments')
// TODO Add correct authorization for different contexts.
// List comments (one page).
router.get('/', listComments)
+6 -1
View File
@@ -1,6 +1,9 @@
// This page refers to dictionary entries, not consultancy or other entries
const router = require('express-promise-router')()
const user = require('../../../middleware/user')
const {
setDerivedDictionaryIdFromEntryId
} = require('../../../middleware/index')
const {
getEntry,
@@ -12,7 +15,9 @@ const {
} = require('../../../controllers/api/v1/dictionaries')
// All further routes are only available to authenticated users with dictionary content editing rights.
router.use(user.isAuthenticated, user.canContentEdit)
router.use(user.isAuthenticated)
router.use('/delete-entry', setDerivedDictionaryIdFromEntryId)
router.use(user.canContentEdit)
// Render entry data for the selected entry
router.get('/', getEntry)