akkun3704 commited on
Commit
3ffe5fa
·
1 Parent(s): d5ad161

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +3 -3
index.js CHANGED
@@ -77,7 +77,7 @@ app.all('/yt', async (req, res) => {
77
  fileSizeH: formatSize(fileSize),
78
  fileSize,
79
  needConvert,
80
- url: !needConvert ? dlUrl : `https://${process.env.SPACE_HOST}${req.path}/convert?hash=${dlUrl}`
81
  }
82
  })
83
  }
@@ -103,11 +103,11 @@ app.get('/yt/convert', async (req, res) => {
103
  }
104
  }))
105
 
106
- const reqTaskId = await fetchPost('https://srvcdn3.2convert.me/api/json', `hash=${encodeURIComponent(hash)}`)
107
  if (!reqTaskId.ok) return res.json({ success: false, message: 'Hash not found' })
108
 
109
  const reqTaskJson = await reqTaskId.json()
110
- console.log(reqTaskJson)
111
  if (reqTaskJson.error) return res.json({ success: false, message: reqTaskJson.message })
112
 
113
  let downloadUrl
 
77
  fileSizeH: formatSize(fileSize),
78
  fileSize,
79
  needConvert,
80
+ url: !needConvert ? dlUrl : `https://${process.env.SPACE_HOST}${req.path}/convert?hash=${encodeURIComponent(dlUrl)}`
81
  }
82
  })
83
  }
 
103
  }
104
  }))
105
 
106
+ const reqTaskId = await fetchPost('https://srvcdn3.2convert.me/api/json', `hash=${hash}`)
107
  if (!reqTaskId.ok) return res.json({ success: false, message: 'Hash not found' })
108
 
109
  const reqTaskJson = await reqTaskId.json()
110
+ console.log({ hash, reqTaskJson })
111
  if (reqTaskJson.error) return res.json({ success: false, message: reqTaskJson.message })
112
 
113
  let downloadUrl