mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-23 08:20:27 +01:00
add UpdateGithubReadme.ts
This commit is contained in:
@@ -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 !'
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user