Another batch of important updates and fixes
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user