mirror of
https://github.com/shafat-96/anicrush-api.git
synced 2026-04-17 15:51:44 +00:00
Update index.js
This commit is contained in:
7
index.js
7
index.js
@@ -102,9 +102,10 @@ app.get('/api/anime/episodes', async (req, res) => {
|
||||
});
|
||||
|
||||
// Endpoint to fetch servers for an episode
|
||||
app.get('/api/anime/servers', async (req, res) => {
|
||||
app.get('/api/anime/servers/:movieId', async (req, res) => {
|
||||
try {
|
||||
const { movieId, episode } = req.query;
|
||||
const { movieId } = req.params;
|
||||
const { episode } = req.query;
|
||||
|
||||
if (!movieId) {
|
||||
return res.status(400).json({ error: 'Movie ID is required' });
|
||||
@@ -252,4 +253,4 @@ if (process.env.VERCEL !== '1') {
|
||||
}
|
||||
|
||||
// Export the Express app for Vercel
|
||||
module.exports = app;
|
||||
module.exports = app;
|
||||
|
||||
Reference in New Issue
Block a user