Better redirect with QRcode

This commit is contained in:
Kasper Rynning-Tønnesen
2018-05-31 17:26:15 +02:00
parent a5c984f2e0
commit f6fd8caa7e
2 changed files with 7 additions and 2 deletions

View File

@@ -41,6 +41,11 @@ router.route('/:channel_name').get(function(req, res, next){
channel(req, res, next);
});
router.route('/r/:base64data').get(function(req, res, next){
var channelToRedirect = Buffer.from(req.params.base64data, 'base64');
res.redirect('/' + channelToRedirect);
});
router.route('/').get(function(req, res, next){
root(req, res, next);
});