Skip to content

Commit

Permalink
src/panel: Fix path for public html
Browse files Browse the repository at this point in the history
  • Loading branch information
sogehige committed Aug 26, 2018
1 parent 5483bbf commit a24d3f4
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/bot/panel.js
Expand Up @@ -67,31 +67,31 @@ function Panel () {
}
})
app.get('/playlist', function (req, res) {
res.sendFile(path.join(__dirname, '..', '..', 'public', 'playlist', 'index.html'))
res.sendFile(path.join(__dirname, '..', 'public', 'playlist', 'index.html'))
})
app.get('/overlays/:overlay', function (req, res) {
res.sendFile(path.join(__dirname, '..', '..', 'public', 'overlays', req.params.overlay + '.html'))
res.sendFile(path.join(__dirname, '..', 'public', 'overlays', req.params.overlay + '.html'))
})
app.get('/custom/:custom', function (req, res) {
res.sendFile(path.join(__dirname, '..', '..', 'public', 'custom', req.params.custom + '.html'))
res.sendFile(path.join(__dirname, '..', 'public', 'custom', req.params.custom + '.html'))
})
app.get('/public/:public', function (req, res) {
res.sendFile(path.join(__dirname, '..', '..', 'public', 'public', req.params.public + '.html'))
res.sendFile(path.join(__dirname, '..', 'public', 'public', req.params.public + '.html'))
})
app.get('/favicon.ico', function (req, res) {
res.sendFile(path.join(__dirname, '..', '..', 'public', 'favicon.ico'))
res.sendFile(path.join(__dirname, '..', 'public', 'favicon.ico'))
})
app.get('/', this.authUser, function (req, res) {
res.sendFile(path.join(__dirname, '..', '..', 'public', 'index.html'))
res.sendFile(path.join(__dirname, '..', 'public', 'index.html'))
})
app.get('/:type/registry/:subtype/:page', this.authUser, function (req, res) {
res.sendFile(path.join(__dirname, '..', '..', 'public', req.params.type, 'registry', req.params.subtype, req.params.page))
res.sendFile(path.join(__dirname, '..', 'public', req.params.type, 'registry', req.params.subtype, req.params.page))
})
app.get('/:type/:subtype/:page', this.authUser, function (req, res) {
res.sendFile(path.join(__dirname, '..', '..', 'public', req.params.type, req.params.subtype, req.params.page))
res.sendFile(path.join(__dirname, '..', 'public', req.params.type, req.params.subtype, req.params.page))
})
app.get('/:type/:page', this.authUser, function (req, res) {
res.sendFile(path.join(__dirname, '..', '..', 'public', req.params.type, req.params.page))
res.sendFile(path.join(__dirname, '..', 'public', req.params.type, req.params.page))
})

this.io = require('socket.io')(this.server)
Expand Down

0 comments on commit a24d3f4

Please sign in to comment.