Added button for generating channelname in frontpage

This commit is contained in:
Kasper Rynning-Tønnesen
2018-02-21 10:30:10 +01:00
parent 5011a3cf10
commit c7e43762b4
6 changed files with 46 additions and 0 deletions

View File

@@ -15,6 +15,10 @@ router.route('/api/frontpages').get(function(req, res) {
});
});
router.route('/api/generate_name').get(function(req, res) {
Functions.generate_channel_name(res);
});
router.route('/api/list/:channel_name').get(function(req, res) {
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");