Update plugins/alldownloader.js
Browse files- plugins/alldownloader.js +0 -44
plugins/alldownloader.js
CHANGED
@@ -225,50 +225,6 @@ AllDlRoutes.get('/api/v1/dl/snapsave', authenticateApiKey, apiLimiter, async (re
|
|
225 |
}
|
226 |
});
|
227 |
|
228 |
-
/**
|
229 |
-
* @swagger
|
230 |
-
* /api/v1/dl/youtube:
|
231 |
-
* get:
|
232 |
-
* summary: Youtube Downloader
|
233 |
-
* tags: [ALL-Downloader]
|
234 |
-
* parameters:
|
235 |
-
* - in: query
|
236 |
-
* name: url
|
237 |
-
* required: true
|
238 |
-
* description: null
|
239 |
-
* schema:
|
240 |
-
* type: string
|
241 |
-
* - in: header
|
242 |
-
* name: x-api-key
|
243 |
-
* required: true
|
244 |
-
* description: API key for authentication
|
245 |
-
* schema:
|
246 |
-
* type: string
|
247 |
-
* responses:
|
248 |
-
* 200:
|
249 |
-
* description: Success
|
250 |
-
* 400:
|
251 |
-
* description: Bad Request (e.g., missing or invalid url)
|
252 |
-
* 401:
|
253 |
-
* description: Unauthorized (e.g., missing or invalid API key)
|
254 |
-
* 500:
|
255 |
-
* description: Internal Server Error
|
256 |
-
*/
|
257 |
-
AllDlRoutes.get('/api/v1/dl/youtube', authenticateApiKey, apiLimiter, async (req, res) => {
|
258 |
-
try {
|
259 |
-
const url = req.query.url;
|
260 |
-
|
261 |
-
if (!url) {
|
262 |
-
return res.status(400).json({ error: "url parameter is required." });
|
263 |
-
}
|
264 |
-
const results = await youtubedl(url);
|
265 |
-
const downloadResults = await downloadMedia(results);
|
266 |
-
res.json({ results, downloadResults });
|
267 |
-
} catch (error) {
|
268 |
-
res.status(500).json({ error: error.message });
|
269 |
-
}
|
270 |
-
});
|
271 |
-
|
272 |
/**
|
273 |
* @swagger
|
274 |
* /api/v1/dl/savefrom:
|
|
|
225 |
}
|
226 |
});
|
227 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
228 |
/**
|
229 |
* @swagger
|
230 |
* /api/v1/dl/savefrom:
|