mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-17 02:34:38 -05:00
add try catch :p
This commit is contained in:
parent
411f6aa1b0
commit
b97a144e4d
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