From 7e72510588f1d6ed14df385f0bd0767690119af5 Mon Sep 17 00:00:00 2001 From: shafat-96 Date: Tue, 25 Feb 2025 15:16:50 +0600 Subject: [PATCH] Update index.js --- index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 29ccf8c..27f23a3 100644 --- a/index.js +++ b/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; \ No newline at end of file +module.exports = app;