forked from github/plane
12 lines
230 B
TypeScript
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;
|
|
}
|
|
};
|