Skip to content

Commit

Permalink
send front path using detail name "path"
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidLawes committed Dec 15, 2023
1 parent ed8049c commit e8cdb91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/services/EventBridge.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class EventBridge(config: ApplicationConfiguration) {
.withTime(new Date())
.withEventBusName(config.faciatool.eventBridgeBusName) // if we don't define this then we use the default event bus, can be referenced by name or arn
.withSource("facia-tool") // could be used in the EventPattern to trigger only some Rules
.withDetailType("front-path") // maybe superfluous? "used to decide what fields to expect in the event detail"
.withDetailType("front-update") // maybe superfluous? "used to decide what fields to expect in the event detail"
.withDetail(EventBridgeDetail(path, pressType).toJsonString)

val request = new PutEventsRequest()
Expand All @@ -28,7 +28,7 @@ class EventBridge(config: ApplicationConfiguration) {
}
}

case class EventBridgeDetail(`front-path`: String, pressType: PressType) {
case class EventBridgeDetail(path: String, pressType: PressType) {
def toJsonString: String = {
Json.toJson(this)(Json.writes[EventBridgeDetail]).toString
}
Expand Down

0 comments on commit e8cdb91

Please sign in to comment.