mirror of
https://github.com/comatory/fb2iCal
synced 2025-06-05 22:09:25 +02:00
add javasript options for downloading files, add basic listing when using JS
This commit is contained in:
19
lib/index.js
19
lib/index.js
@ -18,14 +18,23 @@ app.get('/', (req, res) => {
|
||||
res.render('index')
|
||||
})
|
||||
|
||||
app.get('*', (req, res) => {
|
||||
res.status(400).render('404')
|
||||
})
|
||||
|
||||
app.get('/error', (req, res) => {
|
||||
const error = req.error || req.query.error || ''
|
||||
|
||||
res
|
||||
.status(500)
|
||||
.render('error', { error: req.error || '' })
|
||||
.render('error', { error })
|
||||
})
|
||||
|
||||
app.get('/download', (req, res) => {
|
||||
res
|
||||
.status(200)
|
||||
.render('download')
|
||||
})
|
||||
|
||||
// NOTE: Capture all unkown URLs
|
||||
app.get('*', (req, res) => {
|
||||
res.status(400).render('404')
|
||||
})
|
||||
|
||||
app.use('/download', checkFBURL)
|
||||
|
Reference in New Issue
Block a user