add try catch :p

This commit is contained in:
Ashley 2023-01-07 14:52:46 +00:00
parent 411f6aa1b0
commit b97a144e4d

View file

@ -199,10 +199,11 @@ module.exports = function (app, config, renderTemplate) {
secure = false;
}
try {
if (isvld) {
core.video(v).then((data) => {
if (data) {
if ("video" in getJson(data)) {
if ("video" in data) {
const k = data.video;
const json = data.json;
const engagement = data.engagement;
@ -279,6 +280,9 @@ module.exports = function (app, config, renderTemplate) {
} else {
res.redirect("/");
}
} catch {
res.redirect("/");
}
});
app.get("/lite", async function (req, res) {
@ -448,8 +452,8 @@ module.exports = function (app, config, renderTemplate) {
}
const lyrics = await lyricsFinder(song.artist + song.title);
if (lyrics == undefined) ly = "This Is Where I'd Put The songs lyrics. IF IT HAD ONE ";
if (lyrics == undefined)
ly = "This Is Where I'd Put The songs lyrics. IF IT HAD ONE ";
var ly = "";
if (lyrics) {
@ -480,5 +484,4 @@ module.exports = function (app, config, renderTemplate) {
});
}
});
};