plane/apps/www/lib/services/index.ts

12 lines
230 B
TypeScript
Raw Normal View History

2022-12-20 19:26:19 +00:00
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;
}
};