File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/main/kotlin/no/nav/tms/varsel/api/varsel Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ import io.ktor.server.routing.post
1111import io.ktor.util.pipeline.PipelineContext
1212import kotlinx.serialization.Serializable
1313import no.nav.tms.token.support.idporten.sidecar.user.IdportenUserFactory
14-
14+ import no.nav.tms.token.support.tokenx.validation.user.TokenXUser
15+ import no.nav.tms.token.support.tokenx.validation.user.TokenXUserFactory
1516
1617fun Route.varsel (
1718 varselConsumer : VarselConsumer
@@ -36,7 +37,7 @@ fun Route.varsel(
3637
3738 get(" alle" ){
3839 varselConsumer.getAlleVarsler(
39- userToken = call.userToken ,
40+ userToken = call.tokenXUser.tokenString ,
4041 preferertSpraak = call.request.preferertSpraak
4142 ).let { alleVarsler ->
4243 call.respond(HttpStatusCode .OK , alleVarsler)
@@ -66,6 +67,8 @@ fun Route.varsel(
6667}
6768
6869private val ApplicationCall .userToken get() = IdportenUserFactory .createIdportenUser(this ).tokenString
70+ private val ApplicationCall .tokenXUser get() = TokenXUserFactory .createTokenXUser(this )
71+
6972
7073@Serializable
7174data class AntallVarsler (val beskjeder : Int , val oppgaver : Int , val innbokser : Int )
You can’t perform that action at this time.
0 commit comments