このコミットが含まれているのは:
2026-05-11 03:32:47 +09:00
コミット add60cb413
72個のファイルの変更1659行の追加247行の削除
+4 -3
ファイルの表示
@@ -28,7 +28,7 @@ const apiP = async <T> (
const res = await client[method] (path, body ?? { }, withUserCode (opt))
if (opt?.responseType === 'blob')
return res.data as T
return toCamel (res.data as any, { deep: true }) as T
return toCamel (res.data as Record<string, unknown>, { deep: true }) as T
}
@@ -39,7 +39,7 @@ export const apiGet = async <T> (
const res = await client.get (path, withUserCode (opt))
if (opt?.responseType === 'blob')
return res.data as T
return toCamel (res.data as any, { deep: true }) as T
return toCamel (res.data as Record<string, unknown>, { deep: true }) as T
}
@@ -72,4 +72,5 @@ export const apiDelete = async (
}
export const isApiError = (err: unknown): err is AxiosError => axios.isAxiosError (err)
export const isApiError = <T = unknown> (err: unknown): err is AxiosError<T> =>
axios.isAxiosError (err)