Skip to content

Commit

Permalink
Fix detekt errors
Browse files Browse the repository at this point in the history
  • Loading branch information
DRSchlaubi committed Nov 8, 2024
1 parent feeeebe commit 3948a80
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import java.nio.file.Files
import java.util.*
import kotlin.time.Duration.Companion.minutes

private const val forkName = "mikbot"
private const val FORK_NAME = "mikbot"

@OptIn(InternalAPI::class)
@Suppress("StringLiteralDuplication", "MagicNumber")
Expand Down Expand Up @@ -271,12 +271,11 @@ public class DataCollector(public val level: DataCollection) : KordExKoinCompone

logger.debug { "Submitting collected data - level: ${level.readable}, last UUID: $lastUUID" }


// This is only required for the mikbot fork
entity = when(entity) {
is MinimalDataEntity -> entity.copy(fork = forkName)
is StandardDataEntity -> entity.copy(fork = forkName)
is ExtraDataEntity -> entity.copy(fork = forkName)
entity = when (entity) {
is MinimalDataEntity -> entity.copy(fork = FORK_NAME)
is StandardDataEntity -> entity.copy(fork = FORK_NAME)
is ExtraDataEntity -> entity.copy(fork = FORK_NAME)
else -> entity
}

Expand Down

0 comments on commit 3948a80

Please sign in to comment.