forked from MarseyWorld/MarseyWorld
rename /!group/members to /!group
parent
878ba5b80b
commit
3cec0297cf
|
@ -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("/!<group_name>/members")
|
||||
@app.get("/!<group_name>")
|
||||
@limiter.limit(DEFAULT_RATELIMIT, key_func=get_ID)
|
||||
@auth_required
|
||||
def memberships(v:User, group_name):
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% extends "default.html" %}
|
||||
{% block pagetitle %}!{{group}} Members{% endblock %}
|
||||
{% block pagetitle %}!{{group}}{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
<br>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<td>{{loop.index}}</td>
|
||||
<td>{{group.name}}</td>
|
||||
<td class="unbreakable">
|
||||
<a href="/!{{group}}/members">{{group.member_ids | length}}</a>
|
||||
<a href="/!{{group}}">{{group.member_ids | length}}</a>
|
||||
{% if v.id != group.owner.id %}
|
||||
<button id="leave-{{group}}" type="button" class="ml-3 ml-md-5 btn btn-primary {% if v.id not in group.membership_user_ids %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/!{{group}}/leave','leave-{{group}}','apply-{{group}}','d-none')">
|
||||
{%- if v.id in group.member_ids -%}
|
||||
|
|
Loading…
Reference in New Issue