Update plugins/alldownloader.js
Browse files- plugins/alldownloader.js +14 -3
plugins/alldownloader.js
CHANGED
@@ -69,6 +69,12 @@ async function downloadMedia(media) {
|
|
69 |
* description: null
|
70 |
* schema:
|
71 |
* type: string
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
* responses:
|
73 |
* 200:
|
74 |
* description: Success
|
@@ -79,7 +85,7 @@ async function downloadMedia(media) {
|
|
79 |
* 500:
|
80 |
* description: Internal Server Error
|
81 |
*/
|
82 |
-
AllDlRoutes.get('/api/v1/dl/xnxx-info-v2', apiLimiter, async (req, res) => {
|
83 |
try {
|
84 |
const q = req.query.url;
|
85 |
|
@@ -88,7 +94,6 @@ AllDlRoutes.get('/api/v1/dl/xnxx-info-v2', apiLimiter, async (req, res) => {
|
|
88 |
}
|
89 |
const results = await XInfoDownloaderV2(q);
|
90 |
res.json({ message: results });
|
91 |
-
// console.dir(testings);
|
92 |
} catch (error) {
|
93 |
res.status(500).json({ error: error.message });
|
94 |
}
|
@@ -107,6 +112,12 @@ AllDlRoutes.get('/api/v1/dl/xnxx-info-v2', apiLimiter, async (req, res) => {
|
|
107 |
* description: null
|
108 |
* schema:
|
109 |
* type: string
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
* responses:
|
111 |
* 200:
|
112 |
* description: Success
|
@@ -117,7 +128,7 @@ AllDlRoutes.get('/api/v1/dl/xnxx-info-v2', apiLimiter, async (req, res) => {
|
|
117 |
* 500:
|
118 |
* description: Internal Server Error
|
119 |
*/
|
120 |
-
AllDlRoutes.get('/api/v1/dl/xnxx-search-v2', apiLimiter, async (req, res) => {
|
121 |
try {
|
122 |
const q = req.query.q;
|
123 |
|
|
|
69 |
* description: null
|
70 |
* schema:
|
71 |
* type: string
|
72 |
+
* - in: header
|
73 |
+
* name: x-api-key
|
74 |
+
* required: true
|
75 |
+
* description: API key for authentication
|
76 |
+
* schema:
|
77 |
+
* type: string
|
78 |
* responses:
|
79 |
* 200:
|
80 |
* description: Success
|
|
|
85 |
* 500:
|
86 |
* description: Internal Server Error
|
87 |
*/
|
88 |
+
AllDlRoutes.get('/api/v1/dl/xnxx-info-v2', authenticateApiKey, apiLimiter, async (req, res) => {
|
89 |
try {
|
90 |
const q = req.query.url;
|
91 |
|
|
|
94 |
}
|
95 |
const results = await XInfoDownloaderV2(q);
|
96 |
res.json({ message: results });
|
|
|
97 |
} catch (error) {
|
98 |
res.status(500).json({ error: error.message });
|
99 |
}
|
|
|
112 |
* description: null
|
113 |
* schema:
|
114 |
* type: string
|
115 |
+
* - in: header
|
116 |
+
* name: x-api-key
|
117 |
+
* required: true
|
118 |
+
* description: API key for authentication
|
119 |
+
* schema:
|
120 |
+
* type: string
|
121 |
* responses:
|
122 |
* 200:
|
123 |
* description: Success
|
|
|
128 |
* 500:
|
129 |
* description: Internal Server Error
|
130 |
*/
|
131 |
+
AllDlRoutes.get('/api/v1/dl/xnxx-search-v2', authenticateApiKey, apiLimiter, async (req, res) => {
|
132 |
try {
|
133 |
const q = req.query.q;
|
134 |
|