Remove Discord Activity route

This commit is contained in:
2021-10-08 15:02:22 +02:00
parent 5074e37807
commit c8a09d9ab6
3 changed files with 72 additions and 4 deletions

View File

@@ -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))

View File

@@ -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`
}
})