From 3cec0297cf197c8d5b2f57203b451b574436dd9d Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 26 Feb 2023 00:06:43 +0200 Subject: [PATCH] rename /!group/members to /!group --- files/routes/groups.py | 4 ++-- files/templates/group_memberships.html | 2 +- files/templates/groups.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/files/routes/groups.py b/files/routes/groups.py index bb50c33df..b53e60ab3 100644 --- a/files/routes/groups.py +++ b/files/routes/groups.py @@ -61,7 +61,7 @@ def join_group(v:User, group_name): if not existing: join = GroupMembership(user_id=v.id, group_name=group_name) g.db.add(join) - send_notification(group.owner.id, f"@{v.username} has applied to join !{group}. You can approve or reject the application [here](/!{group}/members).") + send_notification(group.owner.id, f"@{v.username} has applied to join !{group}. You can approve or reject the application [here](/!{group}).") return {"message": f"Application submitted to !{group}'s owner (@{group.owner.username}) successfully!"} @@ -88,7 +88,7 @@ def leave_group(v:User, group_name): return {"message": ''} -@app.get("/!/members") +@app.get("/!") @limiter.limit(DEFAULT_RATELIMIT, key_func=get_ID) @auth_required def memberships(v:User, group_name): diff --git a/files/templates/group_memberships.html b/files/templates/group_memberships.html index 2a434f2b6..c7aa33d57 100644 --- a/files/templates/group_memberships.html +++ b/files/templates/group_memberships.html @@ -1,5 +1,5 @@ {% extends "default.html" %} -{% block pagetitle %}!{{group}} Members{% endblock %} +{% block pagetitle %}!{{group}}{% endblock %} {% block content %}
diff --git a/files/templates/groups.html b/files/templates/groups.html index 73fd6766e..2c9cc843d 100644 --- a/files/templates/groups.html +++ b/files/templates/groups.html @@ -21,7 +21,7 @@ {{loop.index}} {{group.name}} - {{group.member_ids | length}} + {{group.member_ids | length}} {% if v.id != group.owner.id %}