Skip to content

Commit 1e1f56c

Browse files
committed
Har deployet nytt api, så kan fjerne bakoverkompatibel kode
1 parent 05297a7 commit 1e1f56c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/client/app/api/queries/saksbehandlerQueries.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,9 @@ export const usePlukkOppgaveMutation = (callback?: (oppgave: ReservasjonV3FraKø
102102
return useMutation({
103103
mutationFn: (data: { oppgaveKøId: string }): Promise<ReservasjonV3FraKøDto[]> =>
104104
axiosInstance.post(`${apiPaths.hentOppgaveFraKoV3(data.oppgaveKøId)}`, data).then((response) => response.data),
105-
onSuccess: async (data: ReservasjonV3FraKøDto[] | ReservasjonV3FraKøDto) => {
106-
const array = Array.isArray(data) ? data : [data]; // Midlertidig, for å slippe å deploye backend og frontend helt samtidig
107-
if (callback) callback(array);
108-
if (array.length > 0) {
105+
onSuccess: async (data: ReservasjonV3FraKøDto[]) => {
106+
if (callback) callback(data);
107+
if (data.length > 0) {
109108
await queryClient.refetchQueries({ queryKey: [apiPaths.saksbehandlerReservasjoner] });
110109
}
111110
},

0 commit comments

Comments
 (0)