show the time on which ppl blocked/followed the hole

remotes/1693176582716663532/tmp_refs/heads/watchparty
Aevann1 2022-10-27 17:38:54 +02:00
parent 8e84e3893e
commit 98bae12134
2 changed files with 6 additions and 4 deletions

View File

@ -207,7 +207,7 @@ def sub_exilees(v, sub):
def sub_blockers(v, sub):
sub = get_sub_by_name(sub)
if sub.name == "chudrama" and not v.can_see_chudrama: abort(403)
users = g.db.query(User).join(SubBlock) \
users = g.db.query(User, SubBlock).join(SubBlock) \
.filter_by(sub=sub.name) \
.order_by(nullslast(SubBlock.created_utc.desc()), User.username).all()
@ -220,7 +220,7 @@ def sub_blockers(v, sub):
def sub_followers(v, sub):
sub = get_sub_by_name(sub)
if sub.name == "chudrama" and not v.can_see_chudrama: abort(403)
users = g.db.query(User).join(SubSubscription) \
users = g.db.query(User, SubSubscription).join(SubSubscription) \
.filter_by(sub=sub.name) \
.order_by(nullslast(SubSubscription.created_utc.desc()), User.username).all()

View File

@ -11,14 +11,16 @@
<tr>
<th>#</th>
<th>Name</th>
<th>{{verb.title()}} since</th>
</tr>
</thead>
{% for user in users %}
{% for user, object in users %}
<tr>
<td>{{loop.index}}</td>
<td>{% include "user_in_table.html" %}</td>
<td {% if object.created_utc %}data-time="{{object.created_utc}}"{% endif %}></td>
</tr>
{% endfor %}
</table>
{% endblock %}
{% endblock %}