From afe5f0aa81e61de0764239605e7a0bff2f19bf8d Mon Sep 17 00:00:00 2001 From: Mads Lee Giil Date: Wed, 2 Oct 2024 09:39:22 +0200 Subject: [PATCH] =?UTF-8?q?Gj=C3=B8r=20kall=20til=20innsynsrett=20ogs?= =?UTF-8?q?=C3=A5=20hvis=20veileder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/aktivitetAPI.ts | 2 +- src/mocks/handlers.ts | 2 +- src/routing/loaders.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api/aktivitetAPI.ts b/src/api/aktivitetAPI.ts index 855f56bcc..f7c7b6257 100644 --- a/src/api/aktivitetAPI.ts +++ b/src/api/aktivitetAPI.ts @@ -18,7 +18,7 @@ export const oppdaterAktivitet = (aktivitet: VeilarbAktivitet): Promise => { - return fetchToJson(`${AKTIVITET_BASE_URL}/ekstern/innsynsrett`); + return postAsJson(`${AKTIVITET_BASE_URL}/innsynsrett`, { fnr: LocalStorageElement.FNR }); }; export const settAktivitetTilAvtalt = ( diff --git a/src/mocks/handlers.ts b/src/mocks/handlers.ts index dcd9ccb8a..aa31a788e 100644 --- a/src/mocks/handlers.ts +++ b/src/mocks/handlers.ts @@ -160,7 +160,7 @@ export const handlers = [ '/veilarbaktivitet/api/arkivering/journalfor', failOrGetResponse(journalforingFeiler, () => journalføring, 2000), ), - rest.get('/veilarbaktivitet/api/ekstern/innsynsrett', jsonResponse({ foresatteHarInnsynsrett: erUnder18() })), + rest.post('/veilarbaktivitet/api/innsynsrett', jsonResponse({ foresatteHarInnsynsrett: erUnder18() })), // veilarblest rest.post('/veilarblest/api/aktivitetsplan/les', jsonResponse(lest)), rest.put('/veilarblest/api/informasjon/les', jsonResponse(lest)), diff --git a/src/routing/loaders.ts b/src/routing/loaders.ts index cdc868aec..7ab3f8476 100644 --- a/src/routing/loaders.ts +++ b/src/routing/loaders.ts @@ -19,7 +19,7 @@ export const initialPageLoader = aktiviteter: dispatch(thunks.aktiviteter(isVeileder)), arenaAktiviteter: dispatch(thunks.arenaAktiviteter(isVeileder)), lest: dispatch(thunks.lest(isVeileder)), - innsynsrett: !isVeileder ? dispatch(thunks.innsynsrett()) : undefined, // backend støtter foreløpig ikke at vi gjør dette kallet for veiledere + innsynsrett: dispatch(thunks.innsynsrett()), }); };