Skip to content

Commit

Permalink
Fix missing in Kaka.
Browse files Browse the repository at this point in the history
  • Loading branch information
flexable777 committed Feb 27, 2025
1 parent e1548a1 commit a408d13
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,20 @@ class AdminController(
}
}

@GetMapping("/missing-in-kaka", produces = ["application/json"])
@ResponseStatus(HttpStatus.OK)
fun fixMissingInKaka() {
logger.debug("fixMissingInKaka is called")
krevAdminTilgang()
try {
logger.info("Finishing missing in kaka")
adminService.fixMissingInKaka()
} catch (e: Exception) {
logger.warn("Failed to finishing missing in kaka", e)
throw e
}
}

data class Fnr(val fnr: String)

private fun krevAdminTilgang() {
Expand Down
10 changes: 10 additions & 0 deletions src/main/kotlin/no/nav/klage/oppgave/service/AdminService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import no.nav.klage.kodeverk.PartIdType
import no.nav.klage.kodeverk.hjemmel.Registreringshjemmel
import no.nav.klage.kodeverk.hjemmel.ytelseToRegistreringshjemlerV2
import no.nav.klage.oppgave.api.view.TaskListMerkantilView
import no.nav.klage.oppgave.clients.kaka.KakaApiGateway
import no.nav.klage.oppgave.clients.klagefssproxy.KlageFssProxyClient
import no.nav.klage.oppgave.clients.klagefssproxy.domain.FeilregistrertInKabalInput
import no.nav.klage.oppgave.clients.klagefssproxy.domain.GetSakAppAccessInput
Expand Down Expand Up @@ -84,6 +85,7 @@ class AdminService(
private val taskListMerkantilRepository: TaskListMerkantilRepository,
private val pdlFacade: PdlFacade,
private val minsideMicrofrontendService: MinsideMicrofrontendService,
private val kakaApiGateway: KakaApiGateway,
) {

companion object {
Expand Down Expand Up @@ -448,6 +450,14 @@ class AdminService(
logger.debug("Migrated $migrations candidates.")
}

fun fixMissingInKaka() {
kakaApiGateway.finalizeBehandling(
behandlingService.getBehandlingEagerForReadWithoutCheckForAccess(
UUID.fromString("7acb07e4-8b71-4ccf-9cca-f9a72a441812")
)
)
}

fun getInfotrygdsak(sakId: String): SakFromKlanke {
return klageFssProxyClient.getSakWithAppAccess(
sakId = sakId,
Expand Down

0 comments on commit a408d13

Please sign in to comment.