feat: report claimed

pull/8/head
db0 2023-06-26 00:26:02 +02:00
parent 0cd7cf31cd
commit 4227f163a4
2 changed files with 2 additions and 0 deletions

View File

@ -28,6 +28,7 @@ class Models:
'id': fields.Integer(description="The instance id", example=1),
'domain': fields.String(description="The instance domain", example="lemmy.dbzer0.com"),
'software': fields.String(description="The fediverse software running in this instance", example="lemmy"),
'claimed': fields.Integer(description="How many admins from this instance has claimed it."),
'open_registrations': fields.Boolean(description="The instance uptime pct. 100% and thousand of users is unlikely"),
'email_verify': fields.Boolean(description="The amount of local posts in that instance"),
'approvals': fields.Integer(description="The amount of endorsements this instance has given out"),

View File

@ -79,6 +79,7 @@ class Instance(db.Model):
"id": self.id,
"domain": self.domain,
"software": self.software,
"claimed": len(self.admins),
"open_registrations": self.open_registrations,
"email_verify": self.email_verify,
"endorsements": len(self.endorsements),