mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-10 07:58:28 +01:00
Update src/libpoketube/libpoketube-dislikes.js
This commit is contained in:
parent
36d0b26b0c
commit
eeebb436c5
1 changed files with 2 additions and 11 deletions
|
@ -47,17 +47,8 @@ class PokeTubeDislikesAPIManager {
|
||||||
const { fetch } = await import("undici");
|
const { fetch } = await import("undici");
|
||||||
|
|
||||||
|
|
||||||
try {
|
|
||||||
const engagement = await fetch(apiUrl).then((res) => res.json());
|
const engagement = await fetch(apiUrl).then((res) => res.json());
|
||||||
return engagement;
|
return engagement
|
||||||
} catch {
|
|
||||||
try {
|
|
||||||
const engagement = await fetch(fallbackUrl).then((res) => res.json());
|
|
||||||
return engagement;
|
|
||||||
} catch {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue