From 7605264a0665ef80bef95c9b239907e6834e877f Mon Sep 17 00:00:00 2001 From: Sondre Larsen Ovrid Date: Mon, 30 Oct 2023 12:08:25 +0100 Subject: [PATCH] =?UTF-8?q?TC-490=20Bruk=20"hent"-prefiks=20for=20=C3=A5?= =?UTF-8?q?=20unng=C3=A5=20potensiell=20kollisjon=20p=C3=A5=20opprettelse/?= =?UTF-8?q?henting=20av=20ressurs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../veilarboppgave/controller/v2/EnheterControllerV2.java | 6 ++++-- .../controller/v2/OppgavehistorikkControllerV2.java | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/no/nav/veilarboppgave/controller/v2/EnheterControllerV2.java b/src/main/java/no/nav/veilarboppgave/controller/v2/EnheterControllerV2.java index bc13ec5..7f7a499 100644 --- a/src/main/java/no/nav/veilarboppgave/controller/v2/EnheterControllerV2.java +++ b/src/main/java/no/nav/veilarboppgave/controller/v2/EnheterControllerV2.java @@ -1,5 +1,6 @@ package no.nav.veilarboppgave.controller.v2; +import io.swagger.v3.oas.annotations.Operation; import lombok.RequiredArgsConstructor; import no.nav.common.types.identer.AktorId; import no.nav.common.types.identer.Fnr; @@ -16,13 +17,14 @@ @RequiredArgsConstructor @RestController -@RequestMapping("/api/v2/enheter") +@RequestMapping("/api/v2") public class EnheterControllerV2 { private final EnheterService enheterService; private final AuthService authService; - @PostMapping + @PostMapping("/hent-enheter") + @Operation(summary = "Hent enheter") public List hentEnheter(@RequestBody EnheterRequest enheterRequest, @RequestParam("tema") String tema) { Fnr fnr = enheterRequest.fnr(); AktorId aktorid = authService.getAktorIdOrThrow(fnr); diff --git a/src/main/java/no/nav/veilarboppgave/controller/v2/OppgavehistorikkControllerV2.java b/src/main/java/no/nav/veilarboppgave/controller/v2/OppgavehistorikkControllerV2.java index 3a819a0..8f1e5af 100644 --- a/src/main/java/no/nav/veilarboppgave/controller/v2/OppgavehistorikkControllerV2.java +++ b/src/main/java/no/nav/veilarboppgave/controller/v2/OppgavehistorikkControllerV2.java @@ -1,5 +1,6 @@ package no.nav.veilarboppgave.controller.v2; +import io.swagger.v3.oas.annotations.Operation; import lombok.RequiredArgsConstructor; import no.nav.common.types.identer.AktorId; import no.nav.veilarboppgave.domain.Oppgavehistorikk; @@ -15,13 +16,14 @@ @RequiredArgsConstructor @RestController -@RequestMapping("/api/v2/oppgavehistorikk") +@RequestMapping("/api/v2") public class OppgavehistorikkControllerV2 { private final AuthService authService; private final OppgavehistorikkService oppgavehistorikkService; - @PostMapping + @PostMapping("/hent-oppgavehistorikk") + @Operation(summary = "Hent oppgavehistorikk") public List getOppgavehistorikk(@RequestBody OppgavehistorikkRequest oppgavehistorikkRequest) { AktorId aktorId = authService.getAktorIdOrThrow(oppgavehistorikkRequest.fnr());