Something went wrong. Try again.
Something went wrong. Try again.
359 B · 12 lines
TypeScript
at main
12345678910111213import { inject } from '@adonisjs/core'import type { HttpContext } from '@adonisjs/core/http'import StatsService from '#stats/services/stats_service'
@inject()export default class StatsController { constructor(private stats: StatsService) {}
async index({ inertia }: HttpContext) { return inertia.render('stats', await this.stats.gather()) }}