-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fjerner endepunkt som ikke skal brukes lenger (#2858)
- Loading branch information
Showing
5 changed files
with
35 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 27 additions & 34 deletions
61
src/main/kotlin/no/nav/k9/los/tjenester/avdelingsleder/nokkeltall/NokkeltallApis.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,51 @@ | ||
package no.nav.k9.los.tjenester.avdelingsleder.nokkeltall | ||
|
||
import io.ktor.http.* | ||
import io.ktor.server.application.* | ||
import io.ktor.server.response.* | ||
import io.ktor.server.routing.* | ||
import no.nav.k9.los.integrasjon.abac.IPepClient | ||
import no.nav.k9.los.integrasjon.rest.RequestContextService | ||
import no.nav.k9.los.tjenester.saksbehandler.oppgave.OppgaveTjeneste | ||
import org.koin.ktor.ext.inject | ||
|
||
|
||
//TODO Er det greit at denne ikke finner klageoppgaver frem til ferdig overgang til V3? | ||
fun Route.NokkeltallApis() { | ||
val nokkeltallTjeneste by inject<NokkeltallTjeneste>() | ||
val oppgaveTjeneste by inject<OppgaveTjeneste>() | ||
val requestContextService by inject<RequestContextService>() | ||
val pepClient by inject<IPepClient>() | ||
|
||
get("/behandlinger-under-arbeid") { | ||
get("/nye-ferdigstilte-oppsummering") { | ||
requestContextService.withRequestContext(call) { | ||
call.respond(nokkeltallTjeneste.hentOppgaverUnderArbeid()) | ||
if (pepClient.erOppgaveStyrer()) { | ||
call.respond(nokkeltallTjeneste.hentNyeFerdigstilteOppgaverOppsummering()) | ||
} else { | ||
call.respond(HttpStatusCode.Forbidden) | ||
} | ||
} | ||
} | ||
|
||
get("/beholdning-historikk") { | ||
call.respond(oppgaveTjeneste.hentBeholdningAvOppgaverPerAntallDager()) | ||
} | ||
|
||
get("/nye-ferdigstilte-oppsummering") { | ||
call.respond(nokkeltallTjeneste.hentNyeFerdigstilteOppgaverOppsummering()) | ||
} | ||
|
||
get("/dagens-tall") { | ||
requestContextService.withRequestContext(call) { | ||
call.respond(nokkeltallTjeneste.hentDagensTall()) | ||
if (pepClient.erOppgaveStyrer()) { | ||
call.respond(nokkeltallTjeneste.hentDagensTall()) | ||
} else { | ||
call.respond(HttpStatusCode.Forbidden) | ||
} | ||
} | ||
} | ||
|
||
get("/ferdigstilte-historikk") { | ||
call.respond(nokkeltallTjeneste.hentFerdigstilteSiste8Uker()) | ||
} | ||
|
||
get("/aksjonspunkter-per-enhet-historikk") { | ||
val historikk = nokkeltallTjeneste.hentFerdigstilteOppgaverHistorikk( | ||
VelgbartHistorikkfelt.DATO, | ||
VelgbartHistorikkfelt.ENHET, | ||
VelgbartHistorikkfelt.YTELSETYPE, | ||
VelgbartHistorikkfelt.FAGSYSTEM | ||
) | ||
call.respond(historikk) | ||
} | ||
|
||
get("/nye-historikk") { | ||
call.respond(nokkeltallTjeneste.hentNyeSiste8Uker()) | ||
} | ||
|
||
get("/alle-paa-vent_v2") { | ||
call.respond(nokkeltallTjeneste.hentOppgaverPåVent()) | ||
requestContextService.withRequestContext(call) { | ||
if (pepClient.erOppgaveStyrer()) { | ||
val historikk = nokkeltallTjeneste.hentFerdigstilteOppgaverHistorikk( | ||
VelgbartHistorikkfelt.DATO, | ||
VelgbartHistorikkfelt.ENHET, | ||
VelgbartHistorikkfelt.YTELSETYPE, | ||
VelgbartHistorikkfelt.FAGSYSTEM | ||
) | ||
call.respond(historikk) | ||
} else { | ||
call.respond(HttpStatusCode.Forbidden) | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters