fallback fetch data

This commit is contained in:
biglyderv 2024-09-15 02:03:42 -04:00
parent 50d69d2155
commit 0bbc4be40b
No known key found for this signature in database
GPG key ID: 33AC87E9ACE66954

View file

@ -28,8 +28,8 @@ async function genTree(treeId) {
} }
async function main() { async function main() {
// fetchData = await fetch(`https://scratch.mit.edu/projects/${treeID}/remixtree/bare/`).then(x => x.json()); fetchData = await fetch(`https://scratch.mit.edu/projects/${treeID}/remixtree/bare/`).then(x => x.json());
fetchData = await fetch(`https://hf.zenoverse.net/tree/`).then(x => x.json()); fetchData = fetchData || await fetch(`https://hf.zenoverse.net/tree/`).then(x => x.json());
let latestData = await fetch(`https://hf.zenoverse.net/api/`).then(x => x.json()); let latestData = await fetch(`https://hf.zenoverse.net/api/`).then(x => x.json());