Update index.js
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user