add UpdateGithubReadme.ts

This commit is contained in:
2020-12-20 14:47:54 +01:00
parent 1682a3231d
commit 7b372855e2
3 changed files with 78 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
import {HttpContextContract} from "@ioc:Adonis/Core/HttpContext";
import StateValidator from "App/Validators/state/StateValidator";
import Redis from "@ioc:Adonis/Addons/Redis";
import {UpdateGitHubReadme} from "App/tasks/UpdateGithubReadme";
export default class StatesController {
@@ -35,7 +36,7 @@ export default class StatesController {
await Redis.set('artapi/state/sleeping', this.getState(is_sleeping))
}
//Todo updateGitHub
await UpdateGitHubReadme()
return response.status(200).send({
message: 'States successfully modified !'

View File

@@ -2,6 +2,7 @@ import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
import {getTotalStats, getWeeklyStats, getMonthlyStats, getDailyStats} from 'App/Helpers/StatsHelper'
import DockerBuild from "App/Models/DockerBuild"
import DockerCommand from "App/Models/DockerCommand"
import {UpdateGitHubReadme} from "App/tasks/UpdateGithubReadme";
export default class StatsController {
@@ -30,6 +31,8 @@ export default class StatsController {
builds: BigInt(1)
})
}
await UpdateGitHubReadme()
}
public async incrementCommand () {
@@ -44,6 +47,8 @@ export default class StatsController {
commands: BigInt(1)
})
}
await UpdateGitHubReadme()
}
}