fix caching

This commit is contained in:
onezplpl 2024-07-26 15:56:19 -04:00
parent 737048c0cb
commit 95b1fe3fe5
No known key found for this signature in database
GPG key ID: 7EC026A136F9EEC3

View file

@ -5,7 +5,7 @@ let users = {};
let fetchData; let fetchData;
async function genTree(treeId) { async function genTree(treeId) {
fetchData = fetchData || await fetch(`https://corsproxy.io/?https://scratch.mit.edu/projects/${treeId}/remixtree/bare/`) fetchData = fetchData || await fetch(`https://scratch.mit.edu/projects/${treeId}/remixtree/bare/`)
.then(x => x.json()); .then(x => x.json());
entries.push(treeId) entries.push(treeId)
@ -24,7 +24,7 @@ async function genTree(treeId) {
let doThings = false; let doThings = false;
async function main() { async function main() {
let latestData = await fetch("https://corsproxy.io/?https://api.scratch.mit.edu/studios/34493018/projects").then(x => x.json()); let latestData = await fetch("https://trampoline.turbowarp.org/proxy/studios/34493018/projects").then(x => x.json());
await genTree(latestData[0].id); // latest project await genTree(latestData[0].id); // latest project
await genTree("654605857"); // tree bug here, unavoidable without jank await genTree("654605857"); // tree bug here, unavoidable without jank
doThings = true; doThings = true;