feat(caprover): allow human to mark an app as successfully updated
This commit is contained in:
@@ -3,6 +3,7 @@ import EventStore from "../domain/EventStore";
|
||||
import { ApplicationUpdateStarted } from "../domain/events/ApplicationUpdateStarted";
|
||||
import DomainEvent from "../domain/DomainEvent";
|
||||
import DomainProjection from "../domain/DomainProjection";
|
||||
import { ApplicationUpdateFinished } from "../domain/events/ApplicationUpdateFinished";
|
||||
|
||||
export default class FileEventStore implements EventStore {
|
||||
private handlers: DomainProjection[] = [];
|
||||
@@ -55,8 +56,15 @@ export default class FileEventStore implements EventStore {
|
||||
},
|
||||
new Date(event.createdAt)
|
||||
);
|
||||
case "ApplicationUpdateFinished":
|
||||
return new ApplicationUpdateFinished(
|
||||
{
|
||||
id: event.payload.id,
|
||||
},
|
||||
new Date(event.createdAt)
|
||||
);
|
||||
default:
|
||||
throw new Error("Unknown event type" + event.type);
|
||||
throw new Error("Unknown event type: " + event.type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user