Skip to content

Commit

Permalink
Rewrite method type to match methods in generated orval files
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobArrow committed Nov 15, 2024
1 parent e8727d5 commit 3c2abff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/material-list-api/mutator/fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const fetcher = async <ResponseType>({
data
}: {
url: string;
method: "get" | "post" | "put" | "delete" | "patch" | "head";
method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD";
params?: unknown;
data?: BodyType<unknown>;
signal?: AbortSignal;
Expand Down Expand Up @@ -55,7 +55,7 @@ export const fetcher = async <ResponseType>({
}

// 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) {
Expand Down

0 comments on commit 3c2abff

Please sign in to comment.