mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-26 11:58:14 +01:00
add try catch :p
This commit is contained in:
parent
ef27eaf1cd
commit
8f5780b09f
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 q = req.query.quality;
|
||||||
var a = req.query.a;
|
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);
|
const isvld = await core.isvalidvideo(v);
|
||||||
if (!v) res.redirect("/");
|
if (!v) res.redirect("/");
|
||||||
|
|
||||||
|
@ -200,6 +196,10 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
const info = await modules.fetch("http://ip-api.com/json/");
|
||||||
|
const jj = await info.text();
|
||||||
|
const ip = JSON.parse(jj);
|
||||||
|
|
||||||
if (isvld) {
|
if (isvld) {
|
||||||
core.video(v).then((data) => {
|
core.video(v).then((data) => {
|
||||||
if (data) {
|
if (data) {
|
||||||
|
|
Loading…
Reference in a new issue