From cfa17aaf682c753d4e58a0462fe4cfe27cb21d75 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 11 Aug 2022 06:04:41 +0200 Subject: [PATCH] rename some retarded ruqqus terminology --- files/assets/js/comments_admin.js | 8 ++++---- files/routes/admin.py | 16 ++++++++-------- files/templates/comments.html | 2 +- files/templates/post_actions.html | 8 ++++---- files/templates/post_admin_actions_mobile.html | 8 ++++---- 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/files/assets/js/comments_admin.js b/files/assets/js/comments_admin.js index ebb255d2b..87d9478d3 100644 --- a/files/assets/js/comments_admin.js +++ b/files/assets/js/comments_admin.js @@ -1,5 +1,5 @@ function removeComment(post_id,button1,button2) { - url="/ban_comment/"+post_id + url="/remove_comment/"+post_id post(url) @@ -20,7 +20,7 @@ function removeComment(post_id,button1,button2) { }; function approveComment(post_id,button1,button2) { - url="/unban_comment/"+post_id + url="/approve_comment/"+post_id post(url) @@ -42,7 +42,7 @@ function approveComment(post_id,button1,button2) { function removeComment2(post_id,button1,button2) { - url="/ban_comment/"+post_id + url="/remove_comment/"+post_id post(url) @@ -58,7 +58,7 @@ function removeComment2(post_id,button1,button2) { }; function approveComment2(post_id,button1,button2) { - url="/unban_comment/"+post_id + url="/approve_comment/"+post_id post(url) diff --git a/files/routes/admin.py b/files/routes/admin.py index e83a5556b..126a98d87 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -1086,10 +1086,10 @@ def unban_user(user_id, v): else: return {"message": f"@{user.username} was unbanned!"} -@app.post("/ban_post/") +@app.post("/remove_post/") @limiter.limit("1/second;30/minute;200/hour;1000/day") @admin_level_required(2) -def ban_post(post_id, v): +def remove_post(post_id, v): post = get_post(post_id) @@ -1123,10 +1123,10 @@ def ban_post(post_id, v): return {"message": "Post removed!"} -@app.post("/unban_post/") +@app.post("/approve_post/") @limiter.limit("1/second;30/minute;200/hour;1000/day") @admin_level_required(2) -def unban_post(post_id, v): +def approve_post(post_id, v): post = get_post(post_id) @@ -1294,10 +1294,10 @@ def unsticky_comment(cid, v): return {"message": "Comment unpinned!"} -@app.post("/ban_comment/") +@app.post("/remove_comment/") @limiter.limit("1/second;30/minute;200/hour;1000/day") @admin_level_required(2) -def api_ban_comment(c_id, v): +def api_remove_comment(c_id, v): comment = get_comment(c_id) if not comment: @@ -1317,10 +1317,10 @@ def api_ban_comment(c_id, v): return {"message": "Comment removed!"} -@app.post("/unban_comment/") +@app.post("/approve_comment/") @limiter.limit("1/second;30/minute;200/hour;1000/day") @admin_level_required(2) -def api_unban_comment(c_id, v): +def api_approve_comment(c_id, v): comment = get_comment(c_id) if not comment: abort(404) diff --git a/files/templates/comments.html b/files/templates/comments.html index 5474c5668..66e54bf19 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -870,7 +870,7 @@ {% if v and v.admin_level > 1 %} - + {% endif %} {% include "expanded_image_modal.html" %} diff --git a/files/templates/post_actions.html b/files/templates/post_actions.html index 6be0f4d60..73e1fe0d9 100644 --- a/files/templates/post_actions.html +++ b/files/templates/post_actions.html @@ -62,11 +62,11 @@ {% if v.admin_level > 1 %} {% if "/reported/" in request.path %} - {% if v.id != p.author.id %}Remove{% endif %} - Approve + {% if v.id != p.author.id %}Remove{% endif %} + Approve {% else %} - {% if v.id != p.author.id %}Remove{% endif %} - Approve + {% if v.id != p.author.id %}Remove{% endif %} + Approve {% endif %} {% if p.oauth_app %} diff --git a/files/templates/post_admin_actions_mobile.html b/files/templates/post_admin_actions_mobile.html index 08201df2e..205422407 100644 --- a/files/templates/post_admin_actions_mobile.html +++ b/files/templates/post_admin_actions_mobile.html @@ -27,11 +27,11 @@ {% if "/reported/" in request.path %} - - + + {% else %} - - + + {% endif %} {% if p.oauth_app %}