diff --git a/app/Controllers/Http/StatsController.ts b/app/Controllers/Http/StatsController.ts index 8b0cdb5..9363a66 100644 --- a/app/Controllers/Http/StatsController.ts +++ b/app/Controllers/Http/StatsController.ts @@ -6,11 +6,15 @@ import DockerCommand from "App/Models/DockerCommand"; export default class StatsController { public async get ({response}: HttpContextContract) { + const weekly = await getWeeklyStats(); + const monthly = await getMonthlyStats(); + const total = await getTotalStats(); + const other = await getOtherStats(); return response.status(200).send({ - weekly: getWeeklyStats(), - monthly: getMonthlyStats(), - total: getTotalStats(), - other : getOtherStats() + weekly: weekly, + monthly: monthly, + total: total, + other : other }) } diff --git a/start/routes.ts b/start/routes.ts index 43fe779..aea2d99 100644 --- a/start/routes.ts +++ b/start/routes.ts @@ -12,7 +12,7 @@ Route.get('/health', async ({ response }) => { Route.get('/', async ({response}: HttpContextContract) => { response.status(200).send({ - domain: "api.arthurdanjou.fr", + domain: BASE_URL, version: "1.0", routes: { deezer_data: `${BASE_URL}/deezer`, @@ -33,7 +33,6 @@ Location: get Last + Add location + View history Deezer Songs: Tasks: kernel : setTimeout or cron - Dev hours: 5min Deezer songs: 1min */