mirror of
https://github.com/wassname/talk.git
synced 2026-07-01 06:17:27 +08:00
20 lines
453 B
JavaScript
20 lines
453 B
JavaScript
const express = require('express');
|
|
const router = express.Router();
|
|
const SettingsService = require('../../services/settings');
|
|
|
|
router.use('/:embed', (req, res, next) => {
|
|
switch (req.params.embed) {
|
|
case 'stream':
|
|
return SettingsService.retrieve()
|
|
.then(({customCssUrl}) => {
|
|
return res.render('embed/stream', {customCssUrl});
|
|
});
|
|
default:
|
|
|
|
// will return a 404.
|
|
return next();
|
|
}
|
|
});
|
|
|
|
module.exports = router;
|