@@ -35,7 +35,7 @@ trait ChannelMappingsRepository {
3535
3636 def updateMappingActiveChannel (id : String , isActive : Boolean ): Future [Unit ]
3737
38- def updateMappingLiveEvent (id : String , isLive : Boolean ): Future [Unit ]
38+ def updateMappingSetLive (id : String , isLive : Boolean ): Future [Unit ]
3939
4040 def updateMappingLastEvent (id : String , lastEventId : Option [String ], lastEventUpdate : Option [ZonedDateTime ]): Future [Unit ]
4141
@@ -88,7 +88,7 @@ class LiveActivityChannelRepository(client: DynamoDbAsyncClient, tableName: Stri
8888 id = id,
8989 channelId = channelId,
9090 isChannelActive = true ,
91- isEventLive = true ,
91+ isLive = true ,
9292 data = eventData,
9393 competitionId = competitionId,
9494 lastEventId = None ,
@@ -113,11 +113,11 @@ class LiveActivityChannelRepository(client: DynamoDbAsyncClient, tableName: Stri
113113 private def updateMappingById (
114114 id : String ,
115115 isChannelActive : Option [Boolean ] = None ,
116- isEventLive : Option [Boolean ] = None ,
116+ isLive : Option [Boolean ] = None ,
117117 lastEventId : Option [String ] = None ,
118118 lastEventAt : Option [ZonedDateTime ] = None
119119 ): Future [Unit ] = {
120- if (Seq (isChannelActive, isEventLive , lastEventId, lastEventAt).forall(_.isEmpty)) {
120+ if (Seq (isChannelActive, isLive , lastEventId, lastEventAt).forall(_.isEmpty)) {
121121 logger.warn(s " No fields to update for live activity mapping with id $id" )
122122 Future .successful(())
123123 } else {
@@ -131,7 +131,7 @@ class LiveActivityChannelRepository(client: DynamoDbAsyncClient, tableName: Stri
131131 .value(AttributeValue .fromBool(v))
132132 .build()
133133 },
134- " isEventLive " -> isEventLive .map {v =>
134+ " isLive " -> isLive .map {v =>
135135 AttributeValueUpdate
136136 .builder()
137137 .action(AttributeAction .PUT )
@@ -176,11 +176,11 @@ class LiveActivityChannelRepository(client: DynamoDbAsyncClient, tableName: Stri
176176 }
177177
178178 override def updateMappingActiveChannel (id : String , isActive : Boolean ): Future [Unit ] = {
179- updateMappingById(id, isChannelActive = Some (isActive), isEventLive = Some (isActive))
179+ updateMappingById(id, isChannelActive = Some (isActive), isLive = Some (isActive))
180180 }
181181
182- override def updateMappingLiveEvent (id : String , isLive : Boolean ): Future [Unit ] = {
183- updateMappingById(id, isEventLive = Some (isLive))
182+ override def updateMappingSetLive (id : String , isLive : Boolean ): Future [Unit ] = {
183+ updateMappingById(id, isLive = Some (isLive))
184184 }
185185
186186 override def updateMappingLastEvent (id : String , lastEventId : Option [String ], lastEventAt : Option [ZonedDateTime ]): Future [Unit ] = {
0 commit comments