mirror of
https://github.com/SrIzan10/youtubeDownloader.git
synced 2026-05-01 11:06:58 +00:00
async await fixed?
This commit is contained in:
4
index.js
4
index.js
@@ -11,12 +11,12 @@ app.listen(PORT, err => {
|
||||
console.log("server running");
|
||||
});
|
||||
|
||||
app.get('/downloadmp3', async (req, res, next) => {
|
||||
app.get('/downloadmp3', (req, res, next) => {
|
||||
try {
|
||||
var url = req.query.url;
|
||||
let title = 'audio';
|
||||
|
||||
await ytdl.getBasicInfo(url, {
|
||||
ytdl.getBasicInfo(url, {
|
||||
format: 'mp4'
|
||||
}, (err, info) => {
|
||||
if (err) throw err;
|
||||
|
||||
Reference in New Issue
Block a user