1
0
Fork 0
mirror of https://codeberg.org/ashley/poke.git synced 2024-11-17 04:34:38 -05:00

this is one of the commits ever lol

This commit is contained in:
Ashley 2023-05-08 15:56:01 +00:00
parent 3aa0a80b47
commit 618f11c4da

View file

@ -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();
});
};