fix isvalidvideo - gonna check if this is valid

This commit is contained in:
Ashley 2022-12-20 17:16:22 +00:00
parent e386a52b10
commit 143d23759c

View file

@ -144,10 +144,20 @@ 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;