Skip to content

Commit

Permalink
Endre endepunkt - get til post
Browse files Browse the repository at this point in the history
Fødselsnummer i url skal fjernes, derfor
konverterer vi dette endepunktet fra get
til post.
  • Loading branch information
Oddsor committed Mar 18, 2024
1 parent c21d6fd commit 957d327
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions src/services/rest-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,23 +302,16 @@ export const sjekkOmDeltakerAlleredeErRegistrertPaaTiltak = async (
deltakerFnr: string,
tiltakstype: TiltaksType,
avtaleId: string | null,
startdato: string | null,
sluttdato: string | null,
startDato: string | null,
sluttDato: string | null,
): Promise<AlleredeRegistrertAvtale[] | []> => {
const optionalAvtaleId: string = avtaleId ? '&avtaleId=' + avtaleId : '';
const optionalStartdato: string = startdato ? '&startDato=' + startdato : '';
const optionalSluttdato: string = sluttdato ? '&sluttDato=' + sluttdato : '';

const response = await api.get(
'/avtaler/deltaker-allerede-paa-tiltak?' +
'deltakerFnr=' +
deltakerFnr +
'&tiltakstype=' +
tiltakstype +
optionalAvtaleId +
optionalStartdato +
optionalSluttdato,
);
const response = await api.post('/avtaler/deltaker-allerede-paa-tiltak', {
deltakerFnr,
tiltakstype,
avtaleId,
startDato,
sluttDato,
});
return response.data;
};

Expand Down

0 comments on commit 957d327

Please sign in to comment.