mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-10 12:38:26 +01:00
add try catch :p
This commit is contained in:
parent
963a35145a
commit
004cc7998b
1 changed files with 4 additions and 4 deletions
|
@ -178,10 +178,6 @@ module.exports = function (app, config, renderTemplate) {
|
|||
var q = req.query.quality;
|
||||
var a = req.query.a;
|
||||
|
||||
const info = await modules.fetch("http://ip-api.com/json/");
|
||||
const jj = await info.text();
|
||||
const ip = JSON.parse(jj);
|
||||
|
||||
const isvld = await core.isvalidvideo(v);
|
||||
if (!v) res.redirect("/");
|
||||
|
||||
|
@ -200,6 +196,10 @@ module.exports = function (app, config, renderTemplate) {
|
|||
}
|
||||
|
||||
try {
|
||||
const info = await modules.fetch("http://ip-api.com/json/");
|
||||
const jj = await info.text();
|
||||
const ip = JSON.parse(jj);
|
||||
|
||||
if (isvld) {
|
||||
core.video(v).then((data) => {
|
||||
if (data) {
|
||||
|
|
Loading…
Reference in a new issue