diff --git a/files/routes/users.py b/files/routes/users.py index 3927095cd..bf12bf4b4 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -865,16 +865,11 @@ def remove_follow(username, v): from urllib.parse import urlparse import re -@app.get("/pp/") -@app.get("/uid//pic") -@app.get("/uid//pic/profile") +@app.get("/pp/") +@app.get("/uid//pic") +@app.get("/uid//pic/profile") @limiter.exempt -def user_profile_uid(v, id): - try: id = int(id) - except: - try: id = int(id, 36) - except: abort(404) - +def user_profile_uid(id:int): name = f"/pp/{id}" path = cache.get(name) tout = 5 * 60 # 5 min