randydev commited on
Commit
6b32177
·
1 Parent(s): d7a9731
Files changed (2) hide show
  1. lib/all.js +4 -1
  2. plugins/alldownloader.js +6 -0
lib/all.js CHANGED
@@ -125,7 +125,10 @@ function generateRandomTimestamp() {
125
  async function TwitterDownloaderV2(url) {
126
  try {
127
  const result = await lubacotscaper.default.twdl(url);
128
- return result;
 
 
 
129
  } catch (error) {
130
  console.error("Error fetching data:", error.message);
131
  return null;
 
125
  async function TwitterDownloaderV2(url) {
126
  try {
127
  const result = await lubacotscaper.default.twdl(url);
128
+ if typeof(result === "object") {
129
+ result.owner = "xtdevs";
130
+ return result;
131
+ }
132
  } catch (error) {
133
  console.error("Error fetching data:", error.message);
134
  return null;
plugins/alldownloader.js CHANGED
@@ -75,6 +75,12 @@ async function downloadMedia(media) {
75
  * description: null
76
  * schema:
77
  * type: string
 
 
 
 
 
 
78
  * responses:
79
  * 200:
80
  * description: Success
 
75
  * description: null
76
  * schema:
77
  * type: string
78
+ * - in: header
79
+ * name: x-api-key
80
+ * required: true
81
+ * description: API key for authentication
82
+ * schema:
83
+ * type: string
84
  * responses:
85
  * 200:
86
  * description: Success