Skip to content

Commit 34576cf

Browse files
stiangrePetterRuud
andauthored
Fpsak til sak (#43)
* endrer fra fpsak til sak i api kall * Oppdaterer docker Co-authored-by: Petter <[email protected]>
1 parent c19231c commit 34576cf

File tree

26 files changed

+921
-820
lines changed

26 files changed

+921
-820
lines changed

Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ FROM nginx
22
ADD k8s/proxy.nginx /etc/nginx/conf.d/app.conf.template
33

44
ENV APP_DIR="/app" \
5-
APP_PATH_PREFIX="/fpsak" \
6-
APP_CALLBACK_PATH="/fpsak/cb" \
7-
APP_URL_FPTILBAKE="http://fptilbake" \
8-
APP_URL_FPOPPDRAG="http://fpoppdrag" \
9-
APP_URL_FPSAK="http://fpsak"
5+
APP_PATH_PREFIX="/sak" \
6+
APP_CALLBACK_PATH="/sak/cb" \
7+
APP_URL_FPTILBAKE="http://fptilbake" \
8+
APP_URL_FPOPPDRAG="http://fpoppdrag" \
9+
APP_URL_SAK="http://k9-sak"
1010

1111
COPY dist /usr/share/nginx/html
1212

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ FEATURE_TOGGLES=my.toggle,my.second.toggle
4040
### Overstyr enkeltrute (webpack/mocks/fake-error.js)
4141
Nyttig for å teste feilsituasjoner. Overstyres som følger:
4242
```
43-
FAKE_ERROR_PATH=/fpsak/api/behandling/person/personopplysninger
43+
FAKE_ERROR_PATH=/sak/api/behandling/person/personopplysninger
4444
FAKE_ERROR_CODE=401
4545
FAKE_ERROR_BODY={"error":"dette fikk galt"}
4646
```

docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ services:
99
- APP_HOSTNAME=localhost
1010
- APP_URL=http://host.docker.internal:8080
1111
- APP_PORT=9000
12-
- APP_PATH_PREFIX=fpsak
12+
- APP_PATH_PREFIX=sak

packages/behandling-anke/src/data/ankeBehandlingApi.ts

+20-14
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,31 @@ export const AnkeBehandlingApiKeys = {
1919
};
2020

2121
const endpoints = new RestApiConfigBuilder()
22-
.withAsyncPost('/fpsak/api/behandlinger', AnkeBehandlingApiKeys.BEHANDLING_ANKE, { fetchLinkDataAutomatically: false })
22+
.withAsyncPost('/sak/api/behandlinger', AnkeBehandlingApiKeys.BEHANDLING_ANKE, { fetchLinkDataAutomatically: false })
2323
.withInjectedPath('aksjonspunkter', AnkeBehandlingApiKeys.AKSJONSPUNKTER)
2424
.withInjectedPath('vilkar', AnkeBehandlingApiKeys.VILKAR)
2525
.withInjectedPath('anke-vurdering', AnkeBehandlingApiKeys.ANKE_VURDERING)
2626

27-
.withPost('/fpsak/api/behandlinger/bytt-enhet', AnkeBehandlingApiKeys.BEHANDLING_NY_BEHANDLENDE_ENHET)
28-
.withPost('/fpsak/api/behandlinger/henlegg', AnkeBehandlingApiKeys.HENLEGG_BEHANDLING)
29-
.withAsyncPost('/fpsak/api/behandlinger/gjenoppta', AnkeBehandlingApiKeys.RESUME_BEHANDLING, {
27+
.withPost('/sak/api/behandlinger/bytt-enhet', AnkeBehandlingApiKeys.BEHANDLING_NY_BEHANDLENDE_ENHET)
28+
.withPost('/sak/api/behandlinger/henlegg', AnkeBehandlingApiKeys.HENLEGG_BEHANDLING)
29+
.withAsyncPost('/sak/api/behandlinger/gjenoppta', AnkeBehandlingApiKeys.RESUME_BEHANDLING, {
3030
storeResultKey: AnkeBehandlingApiKeys.BEHANDLING_ANKE,
3131
})
32-
.withPost('/fpsak/api/behandlinger/sett-pa-vent', AnkeBehandlingApiKeys.BEHANDLING_ON_HOLD)
32+
.withPost('/sak/api/behandlinger/sett-pa-vent', AnkeBehandlingApiKeys.BEHANDLING_ON_HOLD)
3333

34-
.withPost('/fpsak/api/behandlinger/endre-pa-vent', AnkeBehandlingApiKeys.UPDATE_ON_HOLD)
35-
.withAsyncPost('/fpsak/api/behandling/aksjonspunkt', AnkeBehandlingApiKeys.SAVE_AKSJONSPUNKT, {
34+
.withPost('/sak/api/behandlinger/endre-pa-vent', AnkeBehandlingApiKeys.UPDATE_ON_HOLD)
35+
.withAsyncPost('/sak/api/behandling/aksjonspunkt', AnkeBehandlingApiKeys.SAVE_AKSJONSPUNKT, {
3636
storeResultKey: AnkeBehandlingApiKeys.BEHANDLING_ANKE,
3737
})
3838

39-
.withAsyncPost('/fpsak/api/behandling/anke/mellomlagre-anke', AnkeBehandlingApiKeys.SAVE_ANKE_VURDERING)
40-
.withAsyncPost('/fpsak/api/behandling/anke/mellomlagre-gjennapne-anke', AnkeBehandlingApiKeys.SAVE_REOPEN_ANKE_VURDERING, {
41-
storeResultKey: AnkeBehandlingApiKeys.BEHANDLING_ANKE,
42-
})
39+
.withAsyncPost('/sak/api/behandling/anke/mellomlagre-anke', AnkeBehandlingApiKeys.SAVE_ANKE_VURDERING)
40+
.withAsyncPost(
41+
'/sak/api/behandling/anke/mellomlagre-gjennapne-anke',
42+
AnkeBehandlingApiKeys.SAVE_REOPEN_ANKE_VURDERING,
43+
{
44+
storeResultKey: AnkeBehandlingApiKeys.BEHANDLING_ANKE,
45+
},
46+
)
4347

4448
/* fpformidling */
4549
.withPostAndOpenBlob('/fpformidling/api/brev/forhaandsvis', AnkeBehandlingApiKeys.PREVIEW_MESSAGE)
@@ -48,9 +52,11 @@ const endpoints = new RestApiConfigBuilder()
4852
const reducerName = 'dataContextAnkeBehandling';
4953

5054
export const reduxRestApi = new ReduxRestApiBuilder(endpoints, reducerName)
51-
.withReduxEvents(new ReduxEvents()
52-
.withErrorActionCreator(errorHandler.getErrorActionCreator())
53-
.withPollingMessageActionCreator(setRequestPollingMessage))
55+
.withReduxEvents(
56+
new ReduxEvents()
57+
.withErrorActionCreator(errorHandler.getErrorActionCreator())
58+
.withPollingMessageActionCreator(setRequestPollingMessage),
59+
)
5460
.build();
5561

5662
reducerRegistry.register(reducerName, reduxRestApi.getDataReducer());

packages/behandling-innsyn/src/data/innsynBehandlingApi.ts

+16-12
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,30 @@ export const InnsynBehandlingApiKeys = {
1818
};
1919

2020
const endpoints = new RestApiConfigBuilder()
21-
.withAsyncPost('/fpsak/api/behandlinger', InnsynBehandlingApiKeys.BEHANDLING_INNSYN, { fetchLinkDataAutomatically: false })
21+
.withAsyncPost('/sak/api/behandlinger', InnsynBehandlingApiKeys.BEHANDLING_INNSYN, {
22+
fetchLinkDataAutomatically: false,
23+
})
2224
.withInjectedPath('aksjonspunkter', InnsynBehandlingApiKeys.AKSJONSPUNKTER)
2325
.withInjectedPath('vilkar', InnsynBehandlingApiKeys.VILKAR)
2426
.withInjectedPath('innsyn', InnsynBehandlingApiKeys.INNSYN)
2527

26-
.withPost('/fpsak/api/behandlinger/bytt-enhet', InnsynBehandlingApiKeys.BEHANDLING_NY_BEHANDLENDE_ENHET)
27-
.withPost('/fpsak/api/behandlinger/henlegg', InnsynBehandlingApiKeys.HENLEGG_BEHANDLING)
28-
.withAsyncPost('/fpsak/api/behandlinger/gjenoppta', InnsynBehandlingApiKeys.RESUME_BEHANDLING, {
28+
.withPost('/sak/api/behandlinger/bytt-enhet', InnsynBehandlingApiKeys.BEHANDLING_NY_BEHANDLENDE_ENHET)
29+
.withPost('/sak/api/behandlinger/henlegg', InnsynBehandlingApiKeys.HENLEGG_BEHANDLING)
30+
.withAsyncPost('/sak/api/behandlinger/gjenoppta', InnsynBehandlingApiKeys.RESUME_BEHANDLING, {
2931
storeResultKey: InnsynBehandlingApiKeys.BEHANDLING_INNSYN,
3032
})
31-
.withPost('/fpsak/api/behandlinger/sett-pa-vent', InnsynBehandlingApiKeys.BEHANDLING_ON_HOLD)
32-
.withGet('/fpsak/api/dokument/hent-dokumentliste', InnsynBehandlingApiKeys.INNSYN_DOKUMENTER)
33+
.withPost('/sak/api/behandlinger/sett-pa-vent', InnsynBehandlingApiKeys.BEHANDLING_ON_HOLD)
34+
.withGet('/sak/api/dokument/hent-dokumentliste', InnsynBehandlingApiKeys.INNSYN_DOKUMENTER)
3335

34-
/*
36+
/*
3537
.withInjectedPath('bytt-behandlende-enhet', InnsynBehandlingApiKeys.BEHANDLING_NY_BEHANDLENDE_ENHET)
3638
.withInjectedPath('henlegg-behandling', InnsynBehandlingApiKeys.HENLEGG_BEHANDLING)
3739
.withInjectedPath('gjenoppta-behandling', InnsynBehandlingApiKeys.RESUME_BEHANDLING)
3840
.withInjectedPath('sett-behandling-pa-vent', InnsynBehandlingApiKeys.BEHANDLING_ON_HOLD)
3941
*/
4042

41-
.withPost('/fpsak/api/behandlinger/endre-pa-vent', InnsynBehandlingApiKeys.UPDATE_ON_HOLD)
42-
.withAsyncPost('/fpsak/api/behandling/aksjonspunkt', InnsynBehandlingApiKeys.SAVE_AKSJONSPUNKT, {
43+
.withPost('/sak/api/behandlinger/endre-pa-vent', InnsynBehandlingApiKeys.UPDATE_ON_HOLD)
44+
.withAsyncPost('/sak/api/behandling/aksjonspunkt', InnsynBehandlingApiKeys.SAVE_AKSJONSPUNKT, {
4345
storeResultKey: InnsynBehandlingApiKeys.BEHANDLING_INNSYN,
4446
})
4547
// TODO (TOR) Bør få lenke fra backend og så åpne blob (Flytt open blob ut av rest-apis)
@@ -49,9 +51,11 @@ const endpoints = new RestApiConfigBuilder()
4951
const reducerName = 'dataContextInnsynBehandling';
5052

5153
export const reduxRestApi = new ReduxRestApiBuilder(endpoints, reducerName)
52-
.withReduxEvents(new ReduxEvents()
53-
.withErrorActionCreator(errorHandler.getErrorActionCreator())
54-
.withPollingMessageActionCreator(setRequestPollingMessage))
54+
.withReduxEvents(
55+
new ReduxEvents()
56+
.withErrorActionCreator(errorHandler.getErrorActionCreator())
57+
.withPollingMessageActionCreator(setRequestPollingMessage),
58+
)
5559
.build();
5660

5761
reducerRegistry.register(reducerName, reduxRestApi.getDataReducer());

packages/behandling-klage/src/data/klageBehandlingApi.ts

+22-14
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,32 @@ export const KlageBehandlingApiKeys = {
1919
};
2020

2121
const endpoints = new RestApiConfigBuilder()
22-
.withAsyncPost('/fpsak/api/behandlinger', KlageBehandlingApiKeys.BEHANDLING_KLAGE, { fetchLinkDataAutomatically: false })
22+
.withAsyncPost('/sak/api/behandlinger', KlageBehandlingApiKeys.BEHANDLING_KLAGE, {
23+
fetchLinkDataAutomatically: false,
24+
})
2325
.withInjectedPath('aksjonspunkter', KlageBehandlingApiKeys.AKSJONSPUNKTER)
2426
.withInjectedPath('vilkar', KlageBehandlingApiKeys.VILKAR)
2527
.withInjectedPath('klage-vurdering', KlageBehandlingApiKeys.KLAGE_VURDERING)
2628

27-
.withPost('/fpsak/api/behandlinger/bytt-enhet', KlageBehandlingApiKeys.BEHANDLING_NY_BEHANDLENDE_ENHET)
28-
.withPost('/fpsak/api/behandlinger/henlegg', KlageBehandlingApiKeys.HENLEGG_BEHANDLING)
29-
.withAsyncPost('/fpsak/api/behandlinger/gjenoppta', KlageBehandlingApiKeys.RESUME_BEHANDLING, {
29+
.withPost('/sak/api/behandlinger/bytt-enhet', KlageBehandlingApiKeys.BEHANDLING_NY_BEHANDLENDE_ENHET)
30+
.withPost('/sak/api/behandlinger/henlegg', KlageBehandlingApiKeys.HENLEGG_BEHANDLING)
31+
.withAsyncPost('/sak/api/behandlinger/gjenoppta', KlageBehandlingApiKeys.RESUME_BEHANDLING, {
3032
storeResultKey: KlageBehandlingApiKeys.BEHANDLING_KLAGE,
3133
})
32-
.withPost('/fpsak/api/behandlinger/sett-pa-vent', KlageBehandlingApiKeys.BEHANDLING_ON_HOLD)
34+
.withPost('/sak/api/behandlinger/sett-pa-vent', KlageBehandlingApiKeys.BEHANDLING_ON_HOLD)
3335

34-
.withPost('/fpsak/api/behandlinger/endre-pa-vent', KlageBehandlingApiKeys.UPDATE_ON_HOLD)
35-
.withAsyncPost('/fpsak/api/behandling/aksjonspunkt', KlageBehandlingApiKeys.SAVE_AKSJONSPUNKT, {
36-
storeResultKey: KlageBehandlingApiKeys.BEHANDLING_KLAGE,
37-
})
38-
.withAsyncPost('/fpsak/api/behandling/klage/mellomlagre-klage', KlageBehandlingApiKeys.SAVE_KLAGE_VURDERING)
39-
.withAsyncPost('/fpsak/api/behandling/klage/mellomlagre-gjennapne-klage', KlageBehandlingApiKeys.SAVE_REOPEN_KLAGE_VURDERING, {
36+
.withPost('/sak/api/behandlinger/endre-pa-vent', KlageBehandlingApiKeys.UPDATE_ON_HOLD)
37+
.withAsyncPost('/sak/api/behandling/aksjonspunkt', KlageBehandlingApiKeys.SAVE_AKSJONSPUNKT, {
4038
storeResultKey: KlageBehandlingApiKeys.BEHANDLING_KLAGE,
4139
})
40+
.withAsyncPost('/sak/api/behandling/klage/mellomlagre-klage', KlageBehandlingApiKeys.SAVE_KLAGE_VURDERING)
41+
.withAsyncPost(
42+
'/sak/api/behandling/klage/mellomlagre-gjennapne-klage',
43+
KlageBehandlingApiKeys.SAVE_REOPEN_KLAGE_VURDERING,
44+
{
45+
storeResultKey: KlageBehandlingApiKeys.BEHANDLING_KLAGE,
46+
},
47+
)
4248

4349
/* fpformidling */
4450
.withPostAndOpenBlob('/fpformidling/api/brev/forhaandsvis', KlageBehandlingApiKeys.PREVIEW_MESSAGE)
@@ -47,9 +53,11 @@ const endpoints = new RestApiConfigBuilder()
4753
const reducerName = 'dataContextKlageBehandling';
4854

4955
export const reduxRestApi = new ReduxRestApiBuilder(endpoints, reducerName)
50-
.withReduxEvents(new ReduxEvents()
51-
.withErrorActionCreator(errorHandler.getErrorActionCreator())
52-
.withPollingMessageActionCreator(setRequestPollingMessage))
56+
.withReduxEvents(
57+
new ReduxEvents()
58+
.withErrorActionCreator(errorHandler.getErrorActionCreator())
59+
.withPollingMessageActionCreator(setRequestPollingMessage),
60+
)
5361
.build();
5462

5563
reducerRegistry.register(reducerName, reduxRestApi.getDataReducer());

packages/behandling-papirsoknad/src/data/papirsoknadApi.ts

+14-10
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,30 @@ export const PapirsoknadApiKeys = {
1414
};
1515

1616
const endpoints = new RestApiConfigBuilder()
17-
.withAsyncPost('/fpsak/api/behandlinger', PapirsoknadApiKeys.BEHANDLING_PAPIRSOKNAD, { fetchLinkDataAutomatically: false })
17+
.withAsyncPost('/sak/api/behandlinger', PapirsoknadApiKeys.BEHANDLING_PAPIRSOKNAD, {
18+
fetchLinkDataAutomatically: false,
19+
})
1820
.withInjectedPath('aksjonspunkter', PapirsoknadApiKeys.AKSJONSPUNKTER)
1921

20-
.withPost('/fpsak/api/behandlinger/bytt-enhet', PapirsoknadApiKeys.BEHANDLING_NY_BEHANDLENDE_ENHET)
21-
.withPost('/fpsak/api/behandlinger/henlegg', PapirsoknadApiKeys.HENLEGG_BEHANDLING)
22-
.withAsyncPost('/fpsak/api/behandlinger/gjenoppta', PapirsoknadApiKeys.RESUME_BEHANDLING, {
22+
.withPost('/sak/api/behandlinger/bytt-enhet', PapirsoknadApiKeys.BEHANDLING_NY_BEHANDLENDE_ENHET)
23+
.withPost('/sak/api/behandlinger/henlegg', PapirsoknadApiKeys.HENLEGG_BEHANDLING)
24+
.withAsyncPost('/sak/api/behandlinger/gjenoppta', PapirsoknadApiKeys.RESUME_BEHANDLING, {
2325
storeResultKey: PapirsoknadApiKeys.BEHANDLING_PAPIRSOKNAD,
2426
})
25-
.withPost('/fpsak/api/behandlinger/sett-pa-vent', PapirsoknadApiKeys.BEHANDLING_ON_HOLD)
26-
.withPost('/fpsak/api/behandlinger/endre-pa-vent', PapirsoknadApiKeys.UPDATE_ON_HOLD)
27+
.withPost('/sak/api/behandlinger/sett-pa-vent', PapirsoknadApiKeys.BEHANDLING_ON_HOLD)
28+
.withPost('/sak/api/behandlinger/endre-pa-vent', PapirsoknadApiKeys.UPDATE_ON_HOLD)
2729

28-
.withAsyncPost('/fpsak/api/behandling/aksjonspunkt', PapirsoknadApiKeys.SAVE_AKSJONSPUNKT)
30+
.withAsyncPost('/sak/api/behandling/aksjonspunkt', PapirsoknadApiKeys.SAVE_AKSJONSPUNKT)
2931
.build();
3032

3133
const reducerName = 'dataContextPapirsoknad';
3234

3335
export const reduxRestApi = new ReduxRestApiBuilder(endpoints, reducerName)
34-
.withReduxEvents(new ReduxEvents()
35-
.withErrorActionCreator(errorHandler.getErrorActionCreator())
36-
.withPollingMessageActionCreator(setRequestPollingMessage))
36+
.withReduxEvents(
37+
new ReduxEvents()
38+
.withErrorActionCreator(errorHandler.getErrorActionCreator())
39+
.withPollingMessageActionCreator(setRequestPollingMessage),
40+
)
3741
.build();
3842

3943
reducerRegistry.register(reducerName, reduxRestApi.getDataReducer());

packages/fp-behandling-forstegang-og-revurdering/src/data/fpsakBehandlingApi.jsx

+17-9
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,22 @@ export const BehandlingFpsakApiKeys = {
3939

4040
const endpoints = new RestApiConfigBuilder()
4141
/* /api/behandlinger */
42-
.withAsyncPost('/fpsak/api/behandlinger', BehandlingFpsakApiKeys.BEHANDLING)
43-
.withPost('/fpsak/api/behandlinger/endre-pa-vent', BehandlingFpsakApiKeys.UPDATE_ON_HOLD)
42+
.withAsyncPost('/sak/api/behandlinger', BehandlingFpsakApiKeys.BEHANDLING)
43+
.withPost('/sak/api/behandlinger/endre-pa-vent', BehandlingFpsakApiKeys.UPDATE_ON_HOLD)
4444

4545
/* /api/behandling */
46-
.withAsyncPost('/fpsak/api/behandling/aksjonspunkt', BehandlingFpsakApiKeys.SAVE_AKSJONSPUNKT)
47-
.withAsyncPost('/fpsak/api/behandling/aksjonspunkt/overstyr', BehandlingFpsakApiKeys.SAVE_OVERSTYRT_AKSJONSPUNKT)
48-
.withPost('/fpsak/api/behandling/uttak/stonadskontoerGittUttaksperioder', BehandlingFpsakApiKeys.STONADSKONTOER_GITT_UTTAKSPERIODER)
46+
.withAsyncPost('/sak/api/behandling/aksjonspunkt', BehandlingFpsakApiKeys.SAVE_AKSJONSPUNKT)
47+
.withAsyncPost('/sak/api/behandling/aksjonspunkt/overstyr', BehandlingFpsakApiKeys.SAVE_OVERSTYRT_AKSJONSPUNKT)
48+
.withPost(
49+
'/sak/api/behandling/uttak/stonadskontoerGittUttaksperioder',
50+
BehandlingFpsakApiKeys.STONADSKONTOER_GITT_UTTAKSPERIODER,
51+
)
4952

5053
/* fptilbake/api/dokument */
51-
.withPostAndOpenBlob('/fptilbake/api/dokument/forhandsvis-varselbrev', BehandlingFpsakApiKeys.PREVIEW_TILBAKEKREVING_MESSAGE)
54+
.withPostAndOpenBlob(
55+
'/fptilbake/api/dokument/forhandsvis-varselbrev',
56+
BehandlingFpsakApiKeys.PREVIEW_TILBAKEKREVING_MESSAGE,
57+
)
5258

5359
/* /api/brev */
5460
.withPostAndOpenBlob('/fpformidling/api/brev/forhaandsvis', BehandlingFpsakApiKeys.PREVIEW_MESSAGE)
@@ -85,9 +91,11 @@ const endpoints = new RestApiConfigBuilder()
8591
const reducerName = 'dataContextForstegangOgRevurderingBehandling';
8692

8793
export const reduxRestApi = new ReduxRestApiBuilder(endpoints, reducerName)
88-
.withReduxEvents(new ReduxEvents()
89-
.withErrorActionCreator(errorHandler.getErrorActionCreator())
90-
.withPollingMessageActionCreator(setRequestPollingMessage))
94+
.withReduxEvents(
95+
new ReduxEvents()
96+
.withErrorActionCreator(errorHandler.getErrorActionCreator())
97+
.withPollingMessageActionCreator(setRequestPollingMessage),
98+
)
9199
.build();
92100

93101
reducerRegistry.register(reducerName, reduxRestApi.getDataReducer());

0 commit comments

Comments
 (0)