Remove trailing slash from routes
This commit is contained in:
parent
958b846401
commit
9a9493a196
1 changed files with 6 additions and 6 deletions
12
server.js
12
server.js
|
@ -52,11 +52,7 @@ app.get('/', (req, res) => {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
app.get('/fetch/', (req, res) => {
|
app.post('/fetch', (req, res) => {
|
||||||
res.redirect('/')
|
|
||||||
})
|
|
||||||
|
|
||||||
app.post('/fetch/', (req, res) => {
|
|
||||||
var json
|
var json
|
||||||
var post
|
var post
|
||||||
|
|
||||||
|
@ -118,7 +114,11 @@ app.post('/fetch/', (req, res) => {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
app.get('/api/', (req, res) => {
|
app.get('/fetch', (req, res) => {
|
||||||
|
res.redirect(303, '/')
|
||||||
|
})
|
||||||
|
|
||||||
|
app.get('/api', (req, res) => {
|
||||||
res.json({
|
res.json({
|
||||||
status: 'success',
|
status: 'success',
|
||||||
message: 'Welcome to the Seance API :)',
|
message: 'Welcome to the Seance API :)',
|
||||||
|
|
Loading…
Reference in a new issue