make the server detection work on Pretendo's end
This commit is contained in:
parent
4796def5d2
commit
cfedff9f5a
3 changed files with 16 additions and 2 deletions
|
|
@ -28,4 +28,4 @@ function send(email, subject = 'No email subject provided', message = 'No email
|
|||
|
||||
module.exports = {
|
||||
send: send
|
||||
}
|
||||
}
|
||||
|
|
|
|||
12
account.nintendo.net/routes/root/index.js
Normal file
12
account.nintendo.net/routes/root/index.js
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
let routes = require('express').Router()
|
||||
|
||||
/**
|
||||
* [POST]
|
||||
* Replacement for: nothing, it's used by maryo
|
||||
* Description: tests the validity of this server by returning a predefined message
|
||||
*/
|
||||
routes.get('/isthisworking', async (req, res) => {
|
||||
return res.send("it works!")
|
||||
})
|
||||
|
||||
module.exports = routes
|
||||
|
|
@ -42,7 +42,8 @@ const ROUTES = {
|
|||
SUPPORT: require('./routes/support'),
|
||||
OAUTH20: require('./routes/oauth20'),
|
||||
PROVIDER: require('./routes/provider'),
|
||||
ADMIN: require('./routes/admin')
|
||||
ADMIN: require('./routes/admin'),
|
||||
ROOT: require('./routes/root')
|
||||
}
|
||||
|
||||
// START APPLICATION
|
||||
|
|
@ -71,6 +72,7 @@ router.use('/v1/api/support', ROUTES.SUPPORT); // support API routes
|
|||
router.use('/v1/api/oauth20', ROUTES.OAUTH20); // OAuth API routes
|
||||
router.use('/v1/api/provider', ROUTES.PROVIDER); // OAuth API routes
|
||||
router.use('/v1/api/admin', ROUTES.ADMIN); // admin API routes (not sure what these do in general)
|
||||
router.use('/v1/api', ROUTES.ROOT); // root routes
|
||||
|
||||
|
||||
// 404 handler
|
||||
|
|
|
|||
Loading…
Reference in a new issue