2021-10-03 19:00:41 +02:00
|
|
|
import { Router } from 'express'
|
2021-10-11 22:47:34 +02:00
|
|
|
import finishApi from './finishes.js'
|
2021-10-04 19:35:53 +02:00
|
|
|
import mapApi from './maps.js'
|
|
|
|
import playerApi from './players.js'
|
2021-10-03 19:00:41 +02:00
|
|
|
|
|
|
|
const api = Router()
|
|
|
|
|
2021-10-04 19:35:53 +02:00
|
|
|
api.get(
|
|
|
|
'/',
|
|
|
|
(req, res) => res.json({
|
|
|
|
success: true,
|
|
|
|
response: "You connected to DDStats API! :D"
|
|
|
|
})
|
|
|
|
)
|
2021-10-03 19:00:41 +02:00
|
|
|
|
2021-10-11 22:47:34 +02:00
|
|
|
api.use('/finishes', finishApi)
|
2021-10-04 19:35:53 +02:00
|
|
|
api.use('/maps', mapApi)
|
2021-10-11 22:47:34 +02:00
|
|
|
api.use('/players', playerApi)
|
2021-10-03 19:00:41 +02:00
|
|
|
|
2021-10-06 20:36:20 +02:00
|
|
|
/**
|
|
|
|
* This module is the entrypoint for the API.
|
|
|
|
* @module api/api
|
|
|
|
*/
|
2021-10-03 19:00:41 +02:00
|
|
|
export default api
|