fix: fix healthcheck

This commit is contained in:
tdurieux
2024-04-05 13:11:43 +01:00
parent c940c98b6e
commit 9048b5c3b1
4 changed files with 18 additions and 7 deletions
+3
View File
@@ -159,6 +159,9 @@ export default async function start() {
stat = {};
}, 1000 * 60 * 60);
apiRouter.get("/healthcheck", async (_, res) => {
res.json({ status: "ok" });
});
apiRouter.get("/stat", async (_, res) => {
if (stat.nbRepositories) {
res.json(stat);