forked from rDrama/rDrama
add notification for make_admin and remove_admin
parent
960c0a332f
commit
faf17f420c
|
@ -196,6 +196,8 @@ def make_admin(v:User, username):
|
||||||
)
|
)
|
||||||
g.db.add(ma)
|
g.db.add(ma)
|
||||||
|
|
||||||
|
send_repeatable_notification(user.id, f"@{v.username} added you as an admin!")
|
||||||
|
|
||||||
return {"message": f"@{user.username} has been made admin!"}
|
return {"message": f"@{user.username} has been made admin!"}
|
||||||
|
|
||||||
|
|
||||||
|
@ -215,6 +217,8 @@ def remove_admin(v:User, username):
|
||||||
)
|
)
|
||||||
g.db.add(ma)
|
g.db.add(ma)
|
||||||
|
|
||||||
|
send_repeatable_notification(user.id, f"@{v.username} removed you as an admin!")
|
||||||
|
|
||||||
return {"message": f"@{user.username} has been removed as admin!"}
|
return {"message": f"@{user.username} has been removed as admin!"}
|
||||||
|
|
||||||
@app.post("/distribute/<option_id>")
|
@app.post("/distribute/<option_id>")
|
||||||
|
|
Loading…
Reference in New Issue