diff --git a/kdb-bot/src/bot_data/model/known_user.py b/kdb-bot/src/bot_data/model/known_user.py index 92aa5f4d..3c708f9b 100644 --- a/kdb-bot/src/bot_data/model/known_user.py +++ b/kdb-bot/src/bot_data/model/known_user.py @@ -5,11 +5,11 @@ from cpl_core.database import TableABC class KnownUser(TableABC): def __init__( - self, - dc_id: int, - created_at: datetime = None, - modified_at: datetime = None, - id=0, + self, + dc_id: int, + created_at: datetime = None, + modified_at: datetime = None, + id=0, ): self._known_user_id = id self._discord_id = dc_id diff --git a/kdb-bot/src/bot_graphql/filter/user_filter.py b/kdb-bot/src/bot_graphql/filter/user_filter.py index bb3ddd02..674561ba 100644 --- a/kdb-bot/src/bot_graphql/filter/user_filter.py +++ b/kdb-bot/src/bot_graphql/filter/user_filter.py @@ -6,7 +6,7 @@ from bot_graphql.abc.filter_abc import FilterABC class UserFilter(FilterABC): def __init__( - self, + self, ): FilterABC.__init__(self) @@ -18,18 +18,18 @@ class UserFilter(FilterABC): self._level = None def from_dict(self, values: dict): - if 'id' in values: - self._id = values['id'] - if 'discord_id' in values: - self._discord_id = values['discord_id'] - if 'name' in values: - self._name = values['name'] - if 'xp' in values: - self._xp = values['xp'] - if 'ontime' in values: - self._ontime = values['ontime'] - if 'level' in values: - self._level = values['level'] + if "id" in values: + self._id = values["id"] + if "discord_id" in values: + self._discord_id = values["discord_id"] + if "name" in values: + self._name = values["name"] + if "xp" in values: + self._xp = values["xp"] + if "ontime" in values: + self._ontime = values["ontime"] + if "level" in values: + self._level = values["level"] def filter(self, query: List[User]) -> List[User]: if self._id is not None: diff --git a/kdb-bot/src/bot_graphql/query.py b/kdb-bot/src/bot_graphql/query.py index 63209c78..ccfcafb9 100644 --- a/kdb-bot/src/bot_graphql/query.py +++ b/kdb-bot/src/bot_graphql/query.py @@ -19,8 +19,8 @@ class Query(QueryType): self.set_field("servers", self.resolve_servers) self.set_field("server_count", self.resolve_server_count) - self.set_field("known_users", self.resolve_servers) - self.set_field("known_users_count", self.resolve_server_count) + self.set_field("known_users", self.resolve_known_users) + self.set_field("known_user_count", self.resolve_known_users_count) @FilterABC.resolve_filter_annotation def resolve_servers(self, *_, filter: ServerFilter = None):