We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 62f8e37 commit 66a84ecCopy full SHA for 66a84ec
website/app.py
@@ -27,11 +27,12 @@ def serve_js(filename):
27
return send_from_directory('source/js', filename)
28
29
# community projects are cached to prevent spamming Scratch's API
30
-community_projects_cache = []
+community_projects_cache: list[dict] = []
31
last_cache_time = 0
32
33
@app.route('/api/community_projects/')
34
def community_projects():
35
+ global community_projects_cache
36
if time.time() - 300 > last_cache_time:
37
projects = sa.Studio(id=31478892).projects(limit=40)
38
if isinstance(projects[0], dict): #atm the server this is running on still uses scratchattach 1.7.4 that returns a list of dicts here
0 commit comments