forked from rDrama/rDrama
fix prev commit
parent
09ae8227ea
commit
a113e15ba2
|
@ -894,12 +894,13 @@ def followers(v, username):
|
||||||
@auth_required
|
@auth_required
|
||||||
def following(v, username):
|
def following(v, username):
|
||||||
u = get_user(username, v=v)
|
u = get_user(username, v=v)
|
||||||
|
|
||||||
if not (v.id == u.id or v.admin_level >= PERMS['USER_FOLLOWS_VISIBLE']):
|
if not (v.id == u.id or v.admin_level >= PERMS['USER_FOLLOWS_VISIBLE']):
|
||||||
abort(403)
|
abort(403)
|
||||||
|
|
||||||
page = get_page()
|
page = get_page()
|
||||||
|
|
||||||
users = g.db.query(User).join(Follow, Follow.user_id == u.id) \
|
users = g.db.query(Follow, User).join(Follow, Follow.user_id == u.id) \
|
||||||
.filter(Follow.target_id == User.id)
|
.filter(Follow.target_id == User.id)
|
||||||
|
|
||||||
total = users.count()
|
total = users.count()
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="followers-table">
|
<tbody id="followers-table">
|
||||||
{% for user in users %}
|
{% for follow, user in users %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% include "user_in_table.html" %}</td>
|
<td>{% include "user_in_table.html" %}</td>
|
||||||
<td {% if follow.created_utc > 1599343262 %}data-time="{{follow.created_utc}}"{% endif %}></td>
|
<td {% if follow.created_utc > 1599343262 %}data-time="{{follow.created_utc}}"{% endif %}></td>
|
||||||
|
|
Loading…
Reference in New Issue