mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-10 03:28:35 +01:00
Update p/server.js
This commit is contained in:
parent
4f12bda698
commit
2ceaca4547
1 changed files with 3 additions and 2 deletions
|
@ -104,6 +104,7 @@ app.get("/", (req, res) => {
|
|||
|
||||
const apiUrls = [
|
||||
"https://returnyoutubedislikeapi.com/votes?videoId=",
|
||||
"https://prod-poketube.testing.poketube.fun/api?v=",
|
||||
];
|
||||
|
||||
// Define a cache object
|
||||
|
@ -141,9 +142,9 @@ const { fetch } = await import("undici")
|
|||
return; // Exit the loop if successful
|
||||
} catch (err) {
|
||||
// Log the error for this URL and continue to the next URL
|
||||
res.json(`Error fetching data from ${apiUrl}: ${err.message}`);
|
||||
console.log(`Error fetching data from ${apiUrl}: ${err.message}`);
|
||||
errors.push(err.message);
|
||||
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue