Skip to content

Commit

Permalink
Bruk useswr
Browse files Browse the repository at this point in the history
  • Loading branch information
joarau committed Oct 14, 2024
1 parent caaaf56 commit c065514
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/api/stillings-api/stillingsanalyse.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import useSWR from 'swr';
/**
* Endepunkt /rekrutteringsbistand/stillingsanalyse
*/
import { HttpResponse, http } from 'msw';
import { z } from 'zod';
import { postApiWithSchema } from '../fetcher';
import useSWR from 'swr';

const stillingsanalyseEndepunkt = '/stilling-api/rekrutteringsbistand/stillingsanalyse';

Expand Down Expand Up @@ -47,3 +51,9 @@ export const useStillingsanalyse = (props: StillingsanalyseRequestDTO, vis: bool
error: error,
};
};

export const stillingsanalyseMockMsw = http.post(stillingsanalyseEndepunkt, async (_) => {
return HttpResponse.json(mock);
});

const mock: StillingsanalyseDTO = { sensitiv: false, begrunnelse: '' };

0 comments on commit c065514

Please sign in to comment.