mirror of
https://github.com/Radiquum/AniX.git
synced 2025-05-02 10:59:40 +05:00
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:
parent
b8878c4fb8
commit
37d4b181f5
10 changed files with 131 additions and 1316 deletions
11
frontend/app/api/api-utils.js
Normal file
11
frontend/app/api/api-utils.js
Normal 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;
|
||||
}
|
||||
};
|
10
frontend/app/api/config.js
Normal file
10
frontend/app/api/config.js
Normal 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`,
|
||||
},
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue