mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-13 05:18:06 +01:00
fix isvalidvideo - gonna check if this is valid
This commit is contained in:
parent
51667dc3db
commit
f129b60395
1 changed files with 14 additions and 4 deletions
|
@ -144,11 +144,21 @@ async function isvalidvideo(v) {
|
||||||
if (v != "assets") {
|
if (v != "assets") {
|
||||||
var status;
|
var status;
|
||||||
|
|
||||||
const vld = await fetch(`${config.dislikes}${v}`).then((res) => {
|
async function ryd() {
|
||||||
status = res.status;
|
try {
|
||||||
return res.json();
|
const engagement = await fetch(`${config.dislikes}${v}`).then((res) =>
|
||||||
});
|
res.json()
|
||||||
|
);
|
||||||
|
return engagement;
|
||||||
|
} catch {}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ryd.status) {
|
||||||
|
status = await ryd.status();
|
||||||
|
} else {
|
||||||
|
status = "200";
|
||||||
|
}
|
||||||
|
|
||||||
if (status == 400) {
|
if (status == 400) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue