mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-28 14:49:03 +01:00
add try catch :p
This commit is contained in:
parent
96a8eba7ec
commit
7b8c7dcb73
1 changed files with 141 additions and 138 deletions
|
@ -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) {
|
|||
});
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue