mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-14 12:14:33 +01:00
Add stats route
This commit is contained in:
11
app/Controllers/Http/StatsController.ts
Normal file
11
app/Controllers/Http/StatsController.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
|
||||
export default class StatsController {
|
||||
|
||||
public async index ({ response }: HttpContextContract) {
|
||||
return response.status(200).send({
|
||||
message: 'Stats is under maintenance! Come back later.'
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,9 +3,9 @@ import Application from "@ioc:Adonis/Core/Application";
|
||||
|
||||
Route.get('/discord', 'ProfileController.discord')
|
||||
Route.get('/me', 'ProfileController.me')
|
||||
Route.get('/stats', 'StatsController.index')
|
||||
|
||||
Route.group(() => {
|
||||
|
||||
Route.resource('/users', 'UsersController').except(['edit', 'create'])
|
||||
|
||||
Route.resource('/translations', 'TranslationsController').except(['edit', 'create'])
|
||||
|
||||
@@ -13,9 +13,8 @@ Route.get('/', async ({response}: HttpContextContract) => {
|
||||
healthCheck: `${BASE_URL}/health`,
|
||||
routes: {
|
||||
profile: `${BASE_URL}/me`,
|
||||
//stats: `${BASE_URL}/stats`,
|
||||
locations: `${BASE_URL}/locations`,
|
||||
projects: `${BASE_URL}/projects`
|
||||
stats: `${BASE_URL}/stats`,
|
||||
locations: `${BASE_URL}/locations`
|
||||
}
|
||||
})
|
||||
})
|
||||
@@ -34,5 +33,3 @@ Route.get('/health', async ({response}: HttpContextContract) => {
|
||||
report: report.report
|
||||
})
|
||||
})
|
||||
|
||||
Route.get('/stats', 'StatsController.get')
|
||||
|
||||
Reference in New Issue
Block a user