async await fixed?

This commit is contained in:
2022-05-29 19:12:04 +02:00
committed by GitHub
parent 0d70e3796f
commit 2817b59d3b

View File

@@ -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;