filesafe/routes/file.js

15 lines
584 B
JavaScript
Raw Normal View History

const { Router } = require('hyper-express')
const routes = new Router()
const utils = require('./../controllers/utilsController')
2022-10-05 19:39:51 +00:00
const config = require('./../controllers/utils/ConfigManager')
routes.get('/file/:identifier', async (req, res) => {
// Uploads identifiers parsing, etc., are strictly handled by client-side JS at src/js/file.js
// Rendered page is persistently cached during production (its dynamic content is generated on client-side)
return res.render('file', {
config, utils, versions: utils.versionStrings
}, !utils.devmode)
})
module.exports = routes