forked from MarseyWorld/MarseyWorld
dfsdfs
parent
4cbad50c0d
commit
4bd7e49819
|
@ -370,15 +370,18 @@ def redditor_moment_redirect(username):
|
|||
@auth_required
|
||||
def followers(username, v):
|
||||
u = get_user(username, v=v)
|
||||
users = [x.user for x in u.followers]
|
||||
# if request.host == 'rdrama.net' and u.id == 147: abort(404)
|
||||
ids = [x[0] for x in g.db.query(Follow.user_id).options(lazyload('*')).filter_by(target_id=v.id).all()]
|
||||
users = g.db.query(User).options(lazyload('*')).filter(User.id.in_(ids)).all()
|
||||
return render_template("followers.html", v=v, u=u, users=users)
|
||||
|
||||
@app.get("/@<username>/following")
|
||||
@auth_required
|
||||
def following(username, v):
|
||||
u = get_user(username, v=v)
|
||||
if request.host == 'rdrama.net' and u.id == 147: abort(404)
|
||||
users = [x.target for x in u.following]
|
||||
# if request.host == 'rdrama.net' and u.id == 147: abort(404)
|
||||
ids = [x[0] for x in g.db.query(Follow.target_id).options(lazyload('*')).filter_by(user_id=v.id).all()]
|
||||
users = g.db.query(User).options(lazyload('*')).filter(User.id.in_(ids)).all()
|
||||
return render_template("following.html", v=v, u=u, users=users)
|
||||
|
||||
@app.get("/views")
|
||||
|
|
Loading…
Reference in New Issue