diff --git a/files/routes/admin.py b/files/routes/admin.py index 76b36b196..7ea3cacee 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -339,7 +339,6 @@ def admin_home(v): return render_template("admin/admin_home.html", v=v, x=x) @app.post("/admin/disablesignups") -@limiter.limit("1/second") @admin_level_required(6) @validate_formkey def disablesignups(v): @@ -705,7 +704,6 @@ def admin_image_ban(v): @app.post("/agendaposter/") -@limiter.limit("1/second") @admin_level_required(6) @validate_formkey def agendaposter(user_id, v): @@ -1059,7 +1057,6 @@ def unban_post(post_id, v): @app.post("/distinguish/") -@limiter.limit("1/second") @admin_level_required(1) @validate_formkey def api_distinguish_post(post_id, v): @@ -1085,7 +1082,6 @@ def api_distinguish_post(post_id, v): @app.post("/sticky/") -@limiter.limit("1/second") @admin_level_required(3) def api_sticky_post(post_id, v): @@ -1109,13 +1105,12 @@ def api_sticky_post(post_id, v): else: return {"message": "Post unpinned!"} @app.post("/pin/") -@limiter.limit("1/second") @auth_required def api_pin_post(post_id, v): post = g.db.query(Submission).options(lazyload('*')).filter_by(id=post_id).first() if post: - post.is_pinned = not (post.is_pinned) + post.is_pinned = not post.is_pinned g.db.add(post) g.db.commit() @@ -1173,7 +1168,6 @@ def api_unban_comment(c_id, v): @app.post("/distinguish_comment/") -@limiter.limit("1/second") @auth_required def admin_distinguish_comment(c_id, v): diff --git a/files/routes/awards.py b/files/routes/awards.py index 158a3da9e..dd5a10795 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -85,7 +85,6 @@ def shop(v): @app.post("/buy/") -@limiter.limit("1/second") @auth_required def buy(v, award): if site_name == "Drama": diff --git a/files/routes/settings.py b/files/routes/settings.py index c30618393..fa1df76fb 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -251,7 +251,6 @@ def settings_profile_post(v): return {"error": "You didn't change anything."}, 400 @app.post("/changelogsub") -@limiter.limit("1/second") @auth_required @validate_formkey def changelogsub(v): @@ -735,19 +734,16 @@ def settings_name_change(v): new_name=request.values.get("name").strip() - #make sure name is different if new_name==v.username: return render_template("settings_profile.html", v=v, error="You didn't change anything") - #verify acceptability if not re.match(valid_username_regex, new_name): return render_template("settings_profile.html", v=v, error=f"This isn't a valid username.") - #verify availability name=new_name.replace('_','\_') x= g.db.query(User).options(