Update index.js

This commit is contained in:
2025-05-08 20:49:35 +05:00
committed by GitHub
parent 34bac3d9d9
commit cef9468920

View File

@@ -48,10 +48,12 @@ app.get('/api/profile/:profileId', async (req, res) => {
});
// Эндпоинт для получения информации об эпизоде (Новый эндпоинт)
app.get('/api/episode/:releaseId', async (req, res) => {
const { releaseId } = req.params;
const { token } = req.query; // Извлекаем token из query-параметров
app.get('/api/episode/:releaseId/:typeId', async (req, res) => {
const { releaseId, typeId } = req.params;
const { token } = req.query;
try {
// Пока просто заглушка — можешь потом доработать обработку typeId
const data = await getEpisodeFromAnixart(releaseId, token);
res.json(data);
} catch (error) {