Skip to content

Commit

Permalink
#182 - Correct swagger route handling
Browse files Browse the repository at this point in the history
  • Loading branch information
callmekatootie committed Mar 26, 2021
1 parent 0992675 commit e3ad673
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,12 @@ _.each(routes, (verbs, url) => {
})
/* eslint-enable no-param-reassign */

app.use('/v5/submissions/docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument))
app.use('/', apiRouter)
app.use(errorMiddleware())
// Serve Swagger Docs after setting host and base path
swaggerDocument.host = config.HOST
swaggerDocument.basePath = config.API_VERSION
app.use('/v5/submissions/docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument))

// Check if the route is not found or HTTP method is not supported
app.use('*', (req, res) => {
Expand Down

0 comments on commit e3ad673

Please sign in to comment.