AniX/frontend/app/api/api-utils.js
Kentai Radiquum 37d4b181f5
changelog:
backend:
- Change index POST requests to GET requests

frontend:
- Fetch releases from api endpoint on index page.
- Add filters on main page.
- Remove tailwindcss
2024-04-20 00:39:15 +05:00

11 lines
298 B
JavaScript

export const getData = async (url) => {
try {
const response = await fetch(url);
if (response.status !== 200) {
throw new Error("Ошибка получения данных");
}
return await response.json();
} catch (error) {
return error;
}
};