mirror of
https://codeberg.org/ashley/poke.git
synced 2024-12-24 04:48:05 +01:00
this is one of the commits ever lol
This commit is contained in:
parent
3aa0a80b47
commit
618f11c4da
1 changed files with 2 additions and 1 deletions
|
@ -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();
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue