filesafe/routes/player.js
Bobby Wibowo b117fa9ad1
feat: expose utils to nunjucks templates
also fix nunjucks templates not adhering to env vars overrides for
domains config options, because they attempted to read config directly
2022-06-29 13:58:09 +07:00

16 lines
442 B
JavaScript

const routes = require('express').Router()
const utils = require('./../controllers/utilsController')
const config = require('./../config')
routes.get([
'/player/:identifier',
'/v/:identifier'
], async (req, res, next) => {
// Uploads identifiers parsing, etc., are strictly handled by client-side JS at src/js/player.js
return res.render('player', {
config, utils, versions: utils.versionStrings
})
})
module.exports = routes