Skip to content

Commit c422e78

Browse files
committed
chore: d
1 parent c5032cd commit c422e78

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/routes/middleware/validation/uploadValidation.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const validateUploadUrl = async (req, res, next) => {
2323
const agent = ytdl.createProxyAgent({
2424
uri: "http://152.26.229.66:9443",
2525
});
26-
const isValid = ytdl.validateURL(youtubeUrl, agent);
26+
const isValid = ytdl.validateURL(youtubeUrl);
2727

2828
if (!isValid) {
2929
const error = new createError.BadRequest(MESSAGES.ERROR.INVALID_URL);
@@ -33,7 +33,7 @@ const validateUploadUrl = async (req, res, next) => {
3333
throw error;
3434
}
3535

36-
const videoInfo = await ytdl.getBasicInfo(youtubeUrl);
36+
const videoInfo = await ytdl.getBasicInfo(youtubeUrl, { agent });
3737

3838
validateMetadata(videoInfo.videoDetails);
3939

0 commit comments

Comments
 (0)