plane/apps/www/lib/services/index.ts
2022-12-21 00:56:19 +05:30

12 lines
230 B
TypeScript

import axios from "axios";
// api routes
export const APIFetcher = async (url: any) => {
try {
const response = await axios.get(url);
return response.data;
} catch (error: any) {
throw error.response.data;
}
};