Skip to content

Commit

Permalink
Bugfix/fjerne fnutter rundt fnr i xml (#3475)
Browse files Browse the repository at this point in the history
Rette feil med fnutter rundt FNR ved XML-spoerring mot TPS
  • Loading branch information
krharum authored Apr 24, 2024
1 parent e61ad18 commit b64e52d
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,4 @@ private Function<PredicateSpec, Buildable<Route>> createRoute(String segment, St
.filters(filter, addUserJwtHeaderFilter())
).uri(host);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
import Request from '@/service/services/Request'

const TPS_MESSAGING_URL_V1 = `/testnav-tps-messaging-service/api/v1/personer`
const TPS_MESSAGING_URL_V2 = `/testnav-tps-messaging-service/api/v2/personer`

const getTpsMessagingUrl_V2 = (miljoe) => `${TPS_MESSAGING_URL_V2}/ident?miljoer=${miljoe}`
const getTpsMessagingUrlAllEnvs_V2 = () => `${TPS_MESSAGING_URL_V2}/ident`
const TPS_MESSAGING_URL = `/testnav-tps-messaging-service/api/v1/personer`

export default {
getTpsPersonInfo(ident, miljoe) {
return Request.post(getTpsMessagingUrl_V2(miljoe), ident)
return Request.post(`${TPS_MESSAGING_URL}/ident?miljoer=${miljoe}`, { ident: ident })
},
getTpsPersonInfoAllEnvs(ident) {
return Request.post(getTpsMessagingUrlAllEnvs_V2(), ident)
return Request.post(`${TPS_MESSAGING_URL}/ident`, { ident: ident })
},
deleteBankkontoNorsk(ident) {
return Request.delete(`${TPS_MESSAGING_URL_V1}/${ident}/bankkonto-norsk`)
return Request.delete(`${TPS_MESSAGING_URL}/${ident}/bankkonto-norsk`)
},
deleteBankkontoUtenlandsk(ident) {
return Request.delete(`${TPS_MESSAGING_URL_V1}/${ident}/bankkonto-utenlandsk`)
return Request.delete(`${TPS_MESSAGING_URL}/${ident}/bankkonto-utenlandsk`)
},
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package no.nav.testnav.apps.tpsmessagingservice.provider.v1;

import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
import no.nav.testnav.apps.tpsmessagingservice.dto.TpsMeldingResponse;
import no.nav.testnav.apps.tpsmessagingservice.service.AdressehistorikkService;
Expand All @@ -20,6 +21,7 @@
import no.nav.testnav.libs.data.tpsmessagingservice.v1.FoedselsmeldingResponse;
import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonDTO;
import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonMiljoeDTO;
import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonRequestDTO;
import no.nav.testnav.libs.data.tpsmessagingservice.v1.SpraakDTO;
import no.nav.testnav.libs.data.tpsmessagingservice.v1.TpsMeldingResponseDTO;
import org.springframework.format.annotation.DateTimeFormat;
Expand Down Expand Up @@ -73,6 +75,14 @@ public List<PersonMiljoeDTO> getPerson(@PathVariable String ident,
return personService.getPerson(ident, nonNull(miljoer) ? miljoer : emptyList());
}

@Operation(description = "Hent persondata uten å eksponere ident")
@PostMapping("/ident")
public List<PersonMiljoeDTO> getPerson(@RequestBody PersonRequestDTO request,
@RequestParam(required = false) List<String> miljoer) {

return personService.getPerson(request.getIdent(), nonNull(miljoer) ? miljoer : emptyList());
}

@PostMapping("/{ident}/egenansatt")
public List<TpsMeldingResponseDTO> opprettEgenansatt(@PathVariable String ident,
@RequestParam
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package no.nav.testnav.libs.data.tpsmessagingservice.v1;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PersonRequestDTO {

private String ident;
}

0 comments on commit b64e52d

Please sign in to comment.