Skip to content

Commit

Permalink
Gjør kall til innsynsrett også hvis veileder
Browse files Browse the repository at this point in the history
  • Loading branch information
madsleegiil committed Oct 2, 2024
1 parent 339c132 commit afe5f0a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/api/aktivitetAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const oppdaterAktivitet = (aktivitet: VeilarbAktivitet): Promise<VeilarbA
putAsJson(`${AKTIVITET_BASE_URL}/aktivitet/${aktivitet.id}`, aktivitet);

export const hentInnsynsrett = (): Promise<{ foresatteHarInnsynsrett: boolean }> => {
return fetchToJson(`${AKTIVITET_BASE_URL}/ekstern/innsynsrett`);
return postAsJson(`${AKTIVITET_BASE_URL}/innsynsrett`, { fnr: LocalStorageElement.FNR });
};

export const settAktivitetTilAvtalt = (
Expand Down
2 changes: 1 addition & 1 deletion src/mocks/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
Expand Down
2 changes: 1 addition & 1 deletion src/routing/loaders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
});
};

Expand Down

0 comments on commit afe5f0a

Please sign in to comment.