26 lines
541 B
JavaScript
26 lines
541 B
JavaScript
import { Router } from 'express'
|
|
import playerApi from './players.js'
|
|
import mapApi from './maps.js'
|
|
import finishesApi from './finishes.js'
|
|
import graphApi from './graph.js'
|
|
|
|
const api = Router()
|
|
|
|
api.get(
|
|
'/',
|
|
(req, res) => res.json({
|
|
success: true,
|
|
response: "You connected to DDStats API! :D"
|
|
})
|
|
)
|
|
|
|
api.use('/players', playerApi)
|
|
api.use('/maps', mapApi)
|
|
api.use('/finishes', finishesApi)
|
|
api.use('/graph', graphApi)
|
|
|
|
/**
|
|
* This module is the entrypoint for the API.
|
|
* @module api/api
|
|
*/
|
|
export default api |