diff --git a/frontend/client/mutator.ts b/frontend/client/mutator.ts index d22036ae..2ec820a7 100644 --- a/frontend/client/mutator.ts +++ b/frontend/client/mutator.ts @@ -1,20 +1,17 @@ export const customFetch = async ( - url: string, - options?: RequestInit + url: string, + options?: RequestInit, ): Promise => { - const res = await fetch(url, { - ...options, - // 異なるオリジンからのCookieを保存する - // 異なるオリジンへCookieを送信する - credentials: "include", - }); + const res = await fetch(url, { + ...options, + }); - const response: { status: number; data?: unknown } = { status: res.status }; - const contentType = res.headers.get("content-type"); + const response: { status: number; data?: unknown } = { status: res.status }; + const contentType = res.headers.get('content-type'); - if (contentType?.includes("application/json")) { - response.data = await res.json(); - } + if (contentType?.includes('application/json')) { + response.data = await res.json(); + } - return response; + return response; };