This commit is contained in:
2020-12-19 22:03:41 +01:00
parent 584ec42309
commit 56df09e56b
4 changed files with 43 additions and 9 deletions

View File

@@ -1,16 +1,18 @@
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
import {getTotalStats, getWeeklyStats, getMonthlyStats, getOtherStats} from 'App/Helpers/StatsHelper'
import DockerBuild from "App/Models/DockerBuild";
import DockerCommand from "App/Models/DockerCommand";
import {getTotalStats, getWeeklyStats, getMonthlyStats, getOtherStats, getDailyStats} from 'App/Helpers/StatsHelper'
import DockerBuild from "App/Models/DockerBuild"
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();
const daily = await getDailyStats()
const weekly = await getWeeklyStats()
const monthly = await getMonthlyStats()
const total = await getTotalStats()
const other = await getOtherStats()
return response.status(200).send({
daily: daily,
weekly: weekly,
monthly: monthly,
total: total,