fix missing route handlers
This commit is contained in:
parent
03192887da
commit
c6d85b8839
|
@ -44,11 +44,6 @@ const configureApplication = ({
|
||||||
app.use(forceSecure)
|
app.use(forceSecure)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (appLogger) {
|
|
||||||
app.post('/download/html', downloadHTML(appLogger))
|
|
||||||
app.post('/download', download(appLogger))
|
|
||||||
}
|
|
||||||
|
|
||||||
// Server logs You can alternatively enable these to mimic logs created
|
// Server logs You can alternatively enable these to mimic logs created
|
||||||
// by your web server
|
// by your web server
|
||||||
if (routeLogger) {
|
if (routeLogger) {
|
||||||
|
@ -83,6 +78,9 @@ const configureApplication = ({
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
app.use('/download/html', checkURLParameter)
|
||||||
|
app.use('/download', checkURLParameter)
|
||||||
|
|
||||||
app.get('/error', error)
|
app.get('/error', error)
|
||||||
|
|
||||||
app.get('/about', (req, res) => {
|
app.get('/about', (req, res) => {
|
||||||
|
@ -92,9 +90,9 @@ const configureApplication = ({
|
||||||
// NOTE: Capture all unkown URLs
|
// NOTE: Capture all unkown URLs
|
||||||
app.get('*', notFound)
|
app.get('*', notFound)
|
||||||
|
|
||||||
app.use('/download/html', checkURLParameter)
|
app.post('/download/html', downloadHTML(appLogger || null))
|
||||||
|
app.post('/download', download(appLogger || null))
|
||||||
app.use('/download', checkURLParameter)
|
|
||||||
|
|
||||||
app.use(genericErrorHandler)
|
app.use(genericErrorHandler)
|
||||||
|
|
||||||
|
|
|
@ -171,7 +171,7 @@ import generateICS from '../../lib/services/ics-generator'
|
||||||
|
|
||||||
const postURL = (data) => {
|
const postURL = (data) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
fetch('/download/html', {
|
fetch('/download/html/', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Accept': 'text/html, application/json',
|
'Accept': 'text/html, application/json',
|
||||||
|
|
Loading…
Reference in New Issue