Show modded subs on userpage (#205)

* show modded subs

* remove print lol

* added links
This commit is contained in:
BuckFromRdrama 2022-02-11 18:33:25 -05:00 committed by GitHub
parent cffc44bc9f
commit e1dc79858f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 0 deletions

View file

@ -435,6 +435,12 @@ class User(Base):
return output
@property
@lazy
def moderated_subs(self):
modded_subs = g.db.query(Mod.sub).filter_by(user_id=self.id).all()
return modded_subs
def has_follower(self, user):
return g.db.query(Follow).filter_by(target_id=self.id, user_id=user.id).one_or_none()