Skip to content

Commit

Permalink
TC-490 Bruk "hent"-prefiks for å unngå potensiell kollisjon på oppret…
Browse files Browse the repository at this point in the history
…telse/henting av ressurs
  • Loading branch information
slovrid committed Oct 30, 2023
1 parent 9bdaa0b commit 7605264
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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<OppfolgingEnhet> hentEnheter(@RequestBody EnheterRequest enheterRequest, @RequestParam("tema") String tema) {
Fnr fnr = enheterRequest.fnr();
AktorId aktorid = authService.getAktorIdOrThrow(fnr);
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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<Oppgavehistorikk> getOppgavehistorikk(@RequestBody OppgavehistorikkRequest oppgavehistorikkRequest) {
AktorId aktorId = authService.getAktorIdOrThrow(oppgavehistorikkRequest.fnr());

Expand Down

0 comments on commit 7605264

Please sign in to comment.