mirror of
https://github.com/vkaelin/LeagueStats.git
synced 2026-03-25 21:07:27 +00:00
31 lines
859 B
JavaScript
31 lines
859 B
JavaScript
'use strict'
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Routes
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Http routes are entry points to your web application. You can create
|
|
| routes for different URLs and bind Controller actions to them.
|
|
|
|
|
| A complete guide on routing is available here.
|
|
| http://adonisjs.com/docs/4.1/routing
|
|
|
|
|
*/
|
|
|
|
/** @type {typeof import('@adonisjs/framework/src/Route/Manager')} */
|
|
const Route = use('Route')
|
|
|
|
const Match = use('App/Models/Match')
|
|
|
|
Route.get('/', async () => {
|
|
return {
|
|
greeting: 'Hello world in JSON',
|
|
match: await Match.first()
|
|
}
|
|
})
|
|
|
|
Route.post('/api', 'SummonerController.api')
|
|
Route.post('/ddragon', 'DDragonController.index')
|
|
Route.post('/match', 'MatchController.index')
|
|
Route.post('/match-details', 'MatchController.show')
|