forked from MarseyWorld/MarseyWorld
i accidentially removed the /followers route lol
parent
08f9045818
commit
1af335c9b3
|
@ -899,6 +899,20 @@ def user_id(id):
|
|||
def redditor_moment_redirect(username, v):
|
||||
return redirect(f"/@{username}")
|
||||
|
||||
@app.get("/@<username>/followers")
|
||||
@auth_required
|
||||
def followers(username, v):
|
||||
u = get_user(username, v=v)
|
||||
if u.id == CARP_ID: abort(403)
|
||||
|
||||
if not (v.id == u.id or v.admin_level >= PERMS['USER_FOLLOWS_VISIBLE']):
|
||||
abort(403)
|
||||
|
||||
users = g.db.query(Follow, User).join(Follow, Follow.target_id == u.id) \
|
||||
.filter(Follow.user_id == User.id) \
|
||||
.order_by(Follow.created_utc).all()
|
||||
return render_template("followers.html", v=v, u=u, users=users)
|
||||
|
||||
@app.get("/@<username>/blockers")
|
||||
@auth_required
|
||||
def blockers(username, v):
|
||||
|
|
Loading…
Reference in New Issue