1
0
Fork 0
mirror of https://codeberg.org/ashley/poke.git synced 2024-11-17 07:14:40 -05:00

redirect to shorts if theres no videos :3

This commit is contained in:
ashley 2024-05-22 19:59:42 +00:00
parent 43682f2a87
commit 358a4d8311

View file

@ -369,6 +369,11 @@ module.exports = function (app, config, renderTemplate) {
); );
const dnoreplace = about?.Description.toString(); const dnoreplace = about?.Description.toString();
if(!Array.isArray(tj?.videos) && Array.isArray(shorts?.videos) ) {
res.redirect(`/channel?id=${req.query.id}&tab=shorts`)
}
renderTemplate(res, req, "channel.ejs", { renderTemplate(res, req, "channel.ejs", {
ID, ID,
tab, tab,