From 618f11c4daa64a3162bdfb69890e14332a15e0d5 Mon Sep 17 00:00:00 2001 From: Ashley Date: Mon, 8 May 2023 15:56:01 +0000 Subject: [PATCH] this is one of the commits ever lol --- src/libpoketube/init/pages-404-and-main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libpoketube/init/pages-404-and-main.js b/src/libpoketube/init/pages-404-and-main.js index f33f3d08..b2791394 100644 --- a/src/libpoketube/init/pages-404-and-main.js +++ b/src/libpoketube/init/pages-404-and-main.js @@ -66,13 +66,14 @@ module.exports = function (app, config, renderTemplate) { } return renderTemplate(res, req, "landing.ejs"); }; - + if (req.params.v && /[a-zA-Z0-9]+/.test(req.param.v)) { const isvld = await core.isvalidvideo(req.params.v); if (isvld) { return res.redirect(`/watch?v=${req.params.v}`); } } + return rendermainpage(); }); };