Remove trailing slash from routes

This commit is contained in:
Hippo 2020-05-12 16:16:33 +05:30
parent 958b846401
commit 9a9493a196

View file

@ -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 :)',