Fixed some histories
All checks were successful
Deploy staging on push / on-push-deploy_sh-edraft (push) Successful in 4m1s

This commit is contained in:
2023-11-07 18:15:41 +01:00
parent 692cf8de31
commit 804aa0b9b8
5 changed files with 17 additions and 3 deletions

View File

@@ -37,6 +37,9 @@ type UserHistory implements HistoryTableQuery {
id: ID
discordId: String
xp: Int
messageCount: Int
reactionCount: Int
birthday: String
server: ID

View File

@@ -9,6 +9,9 @@ class UserHistoryQuery(HistoryQueryABC):
self.set_field("id", self.resolve_id)
self.set_field("discordId", self.resolve_discord_id)
self.set_field("xp", self.resolve_xp)
self.set_field("messageCount", lambda x, *_: x.message_count)
self.set_field("reactionCount", lambda x, *_: x.reaction_count)
self.set_field("birthday", lambda x, *_: None if x.birthday is None else x.birthday.strftime("%d.%m.%Y"))
self.set_field("server", self.resolve_server)
@staticmethod