From 2522154808f1c98dd926b79c92a5e33d6e25cb8c Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 23 Jul 2023 03:10:05 +0300 Subject: [PATCH] fix this https://rdrama.net/h/lit/post/189977/i-like-wendigoon-but-boy-did/4638942#context --- files/routes/subs.py | 8 ++++---- files/templates/comments.html | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/files/routes/subs.py b/files/routes/subs.py index c7b30d79d..87b81dfdc 100644 --- a/files/routes/subs.py +++ b/files/routes/subs.py @@ -785,14 +785,14 @@ def sub_stealth(v:User, sub): return {"message": f"Stealth mode has been disabled for /h/{sub} successfully!"} -@app.post("/mod_pin/") +@app.post("/pin_comment_mod/") @feature_required('PINS') @limiter.limit('1/second', scope=rpath) @limiter.limit('1/second', scope=rpath, key_func=get_ID) @limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400) @limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400, key_func=get_ID) @is_not_permabanned -def mod_pin(cid, v): +def pin_comment_mod(cid, v): comment = get_comment(cid, v=v) @@ -817,13 +817,13 @@ def mod_pin(cid, v): return {"message": "Comment pinned!"} -@app.post("/unmod_pin/") +@app.post("/unpin_comment_mod/") @limiter.limit('1/second', scope=rpath) @limiter.limit('1/second', scope=rpath, key_func=get_ID) @limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400) @limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400, key_func=get_ID) @is_not_permabanned -def mod_unpin(cid, v): +def unpin_comment_mod(cid, v): comment = get_comment(cid, v=v) diff --git a/files/templates/comments.html b/files/templates/comments.html index fa6805f0c..348114a34 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -442,7 +442,7 @@ {% elif v.id == c.post.author_id %} {% set url = "pin_comment" %} {% elif c.post.sub and v.mods(c.post.sub) %} - {% set url = "mod_pin" %} + {% set url = "pin_comment_mod" %} {% endif %} {% if url != "" %} @@ -629,8 +629,8 @@ {% elif c.post.sub and v.mods(c.post.sub) %} - - + + {% endif %} {% endif %}