feat(caprover): allow human to mark an app as successfully updated

This commit is contained in:
Pierre Martin
2024-03-10 12:22:38 +01:00
parent 5c599842f6
commit 204efe8a8b
9 changed files with 215 additions and 12 deletions

4
joe.ts
View File

@@ -3,6 +3,7 @@ import applications from "./routes/applications";
import applicationsUpdate from "./routes/applications.update";
import Layout, { html } from "./ui/Layout";
import DockerHub from "./services/DockerHub";
import Human from "./services/Human";
import FileEventStore from "./infrastructure/FileEventStore";
import AppQueries from "./domain/AppQueries";
import AppProjections from "./domain/AppProjections";
@@ -25,6 +26,7 @@ const caprover = new Caprover(
process.env.CAPTAIN_PASSWORD
);
const dockerHub = new DockerHub();
const human = new Human(eventStore);
const server = Bun.serve({
port: 3000,
@@ -42,7 +44,7 @@ const server = Bun.serve({
case "/applications":
return applications(req, caprover, queries);
case "/applications/update":
return applicationsUpdate(req, caprover, dockerHub, queries);
return applicationsUpdate(req, caprover, dockerHub, human, queries);
default:
return new Response("Not Found", { status: 404 });
}