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

17
services/Human.ts Normal file
View File

@@ -0,0 +1,17 @@
import EventStore from "../domain/EventStore";
import { ApplicationUpdateFinished } from "../domain/events/ApplicationUpdateFinished";
/**
* Actions done by a Human in the application
*/
class Human {
constructor(private eventStore: EventStore) {}
markApplicationAsUpdated(appName: string) {
this.eventStore.append(
new ApplicationUpdateFinished({ id: appName }, new Date())
);
}
}
export default Human;