diff --git a/app/Controllers/Http/StatsController.ts b/app/Controllers/Http/StatsController.ts new file mode 100644 index 0000000..c1d426b --- /dev/null +++ b/app/Controllers/Http/StatsController.ts @@ -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.' + }) + } + +} diff --git a/start/routes/api.ts b/start/routes/api.ts index 3f69315..0b1695d 100644 --- a/start/routes/api.ts +++ b/start/routes/api.ts @@ -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']) diff --git a/start/routes/home.ts b/start/routes/home.ts index 2e705ae..9d27307 100644 --- a/start/routes/home.ts +++ b/start/routes/home.ts @@ -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')