diff --git a/web/src/api/index.jsx b/web/src/api/index.jsx index 6e1db4388..427c65119 100644 --- a/web/src/api/index.jsx +++ b/web/src/api/index.jsx @@ -10,13 +10,7 @@ export function ApiProvider({ children, options }) { return ( { - if (typeof arg === 'string') { - return axios.get(arg).then((res) => res.data); - } - const [path, params] = arg; - return axios.get(path, { params }).then((res) => res.data); - }, + fetcher: (path, params) => axios.get(path, { params }).then((res) => res.data), ...options, }} >