Skip to content

Commit

Permalink
Bruker UnleashService fra felles i stedet for DefaultUnleashService
Browse files Browse the repository at this point in the history
  • Loading branch information
throndi committed Sep 28, 2023
1 parent 2e55e59 commit a7eace5
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package no.nav.familie.klage.infrastruktur.featuretoggle

import no.nav.familie.unleash.DefaultUnleashService
import no.nav.familie.unleash.UnleashService
import org.springframework.stereotype.Service

@Service
class FeatureToggleService(val defaultUnleashService: DefaultUnleashService) {
class FeatureToggleService(val unleashService: UnleashService) {

fun isEnabled(toggle: Toggle): Boolean {
return defaultUnleashService.isEnabled(toggle.toggleId, false)
return unleashService.isEnabled(toggle.toggleId, false)
}

fun isEnabled(toggle: Toggle, defaultVerdi: Boolean): Boolean {
return defaultUnleashService.isEnabled(toggle.toggleId, defaultVerdi)
return unleashService.isEnabled(toggle.toggleId, defaultVerdi)
}
}

Expand Down

0 comments on commit a7eace5

Please sign in to comment.