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
This commit is contained in:
Kentai Radiquum 2024-04-20 00:39:15 +05:00
parent b8878c4fb8
commit 37d4b181f5
Signed by: Radiquum
GPG key ID: 858E8EE696525EED
10 changed files with 131 additions and 1316 deletions

View file

@ -0,0 +1,11 @@
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;
}
};

View file

@ -0,0 +1,10 @@
export const API_URL = "http://anix.test.local/api";
export const endpoints = {
index: {
last: `${API_URL}/index/last`,
ongoing: `${API_URL}/index/ongoing`,
announce: `${API_URL}/index/announce`,
finished: `${API_URL}/index/finished`,
},
};