From 1a4c9a937c15a7312eeb941255c0188e76a51ee1 Mon Sep 17 00:00:00 2001 From: Jacob Pihl Date: Thu, 14 Nov 2024 13:49:37 +0100 Subject: [PATCH] Rewrite method type to match methods in generated orval files --- src/core/material-list-api/mutator/fetcher.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/material-list-api/mutator/fetcher.ts b/src/core/material-list-api/mutator/fetcher.ts index 9232509839..35228148ab 100644 --- a/src/core/material-list-api/mutator/fetcher.ts +++ b/src/core/material-list-api/mutator/fetcher.ts @@ -14,7 +14,7 @@ export const fetcher = async ({ data }: { url: string; - method: "get" | "post" | "put" | "delete" | "patch" | "head"; + method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD"; params?: unknown; data?: BodyType; signal?: AbortSignal; @@ -55,7 +55,7 @@ export const fetcher = async ({ } // Return the response body in JSON format if the method is GET. - if (method === "get") { + if (method === "GET") { try { return (await response.json()) as ResponseType; } catch (error) {