From 4227f163a48d6138e69347d28fc1fc2b34d90a0e Mon Sep 17 00:00:00 2001 From: db0 Date: Mon, 26 Jun 2023 00:26:02 +0200 Subject: [PATCH] feat: report claimed --- fediseer/apis/models/v1.py | 1 + fediseer/classes/instance.py | 1 + 2 files changed, 2 insertions(+) diff --git a/fediseer/apis/models/v1.py b/fediseer/apis/models/v1.py index e4879d6..64e8fe4 100644 --- a/fediseer/apis/models/v1.py +++ b/fediseer/apis/models/v1.py @@ -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"), diff --git a/fediseer/classes/instance.py b/fediseer/classes/instance.py index 5296656..ef7ea19 100644 --- a/fediseer/classes/instance.py +++ b/fediseer/classes/instance.py @@ -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),