CJVT updates August and September 2026

This commit is contained in:
Luka Romih
2026-10-01 00:49:26 +02:00
parent fd02e25719
commit 83f73aeb58
135 changed files with 6146 additions and 1970 deletions
+19
View File
@@ -0,0 +1,19 @@
const router = require('express-promise-router')()
const dictionary = require('../controllers/dictionaries')
// All routes require an authenticated user. Redirect to the site root, not
// req.baseUrl - unlike routes/dictionaries.js this router's own root ('/')
// is itself gated, so redirecting to req.baseUrl (== '/ogled-virov') would
// send an anonymous visitor straight back into the same check, looping.
router.use((req, res, next) => {
if (req.isAuthenticated()) return next()
res.redirect(303, '/')
})
// Show a read-only list of all dictionaries on the portal, regardless of status.
router.get('/', dictionary.listViewableDictionaries)
// Show read-only details for a specific dictionary.
router.get('/:dictionaryId/podatki', dictionary.viewDictionaryDetails)
module.exports = router