mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-14 12:14:33 +01:00
Remove Discord Activity route
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import Route from "@ioc:Adonis/Core/Route";
|
||||
import Application from "@ioc:Adonis/Core/Application";
|
||||
|
||||
Route.get('/discord', 'ProfileController.discord')
|
||||
Route.get('/me', 'ProfileController.me')
|
||||
Route.get('/stats', 'StatsController.index')
|
||||
Route.get('/states', 'StatesController.index')
|
||||
Route.resource('/locations', 'LocationsController').only(['index', 'store'])
|
||||
|
||||
Route.group(() => {
|
||||
@@ -13,7 +13,17 @@ Route.group(() => {
|
||||
|
||||
Route.resource('/files', 'FilesController').only(['index', 'store', 'destroy'])
|
||||
|
||||
}).middleware('auth')
|
||||
Route.group(() => {
|
||||
Route.post('/sleeping', 'StatesController.setSleeping')
|
||||
Route.post('/developing', 'StatesController.setDeveloping')
|
||||
}).prefix('states')
|
||||
|
||||
Route.group(() => {
|
||||
Route.post('/commands', 'StatsController.incrementCommandCount')
|
||||
Route.post('/docker', 'StatsController.incrementBuildCount')
|
||||
}).prefix('stats')
|
||||
|
||||
}).middleware('auth:web,api')
|
||||
|
||||
Route.get('/files/:filename', async ({response, params}) => {
|
||||
response.download(Application.makePath('storage', params.filename))
|
||||
|
||||
@@ -10,10 +10,11 @@ Route.get('/', async ({response}: HttpContextContract) => {
|
||||
domain: BASE_URL,
|
||||
version: Env.get('API_VERSION'),
|
||||
source: `${BASE_URL}/source`,
|
||||
healthCheck: `${BASE_URL}/health`,
|
||||
health: `${BASE_URL}/health`,
|
||||
routes: {
|
||||
profile: `${BASE_URL}/me`,
|
||||
stats: `${BASE_URL}/stats`,
|
||||
states: `${BASE_URL}/states`,
|
||||
locations: `${BASE_URL}/locations`
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user