Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
MalikAza committed Jul 15, 2024
1 parent 9f76db7 commit 5eeacc2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pyZUnivers/api_responses/corporations.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class CorporationBonus(TypedDict):
class CorporationUserMoreInfos(TypedDict):
discordAvatar: str
discordId: str
discordUsername: str
discordUserName: str
discordGlobalName: str
isActive: bool

Expand Down
4 changes: 2 additions & 2 deletions pyZUnivers/corporations.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def date(self) -> datetime:

@property
def user_name(self) -> str:
return self.__payload['user']['discordUsername']
return self.__payload['user']['discordUserName']

@property
def user_id(self) -> int:
Expand Down Expand Up @@ -202,7 +202,7 @@ def id(self) -> int:

@property
def name(self) -> str:
return self.__payload['user']['discordUsername']
return self.__payload['user']['discordUserName']

@property
def role(self) -> str:
Expand Down
8 changes: 4 additions & 4 deletions tests/test_corporations.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,26 @@ def setUp(self):
{
'amount': 100,
'date': '2022-01-01T10:00:00',
'user': {'discordUsername': 'User1', 'discordId': 123},
'user': {'discordUserName': 'User1', 'discordId': 123},
'role': 'ADMIN'
},
{
'amount': 200,
'date': '2022-01-02T10:00:00',
'user': {'discordUsername': 'User2', 'discordId': 456},
'user': {'discordUserName': 'User2', 'discordId': 456},
'role': 'MEMBER'
}
],
'userCorporations': [
{
'user': {'discordId': 123, 'discordUsername': 'User1'},
'user': {'discordId': 123, 'discordUserName': 'User1'},
'role': 'ADMIN',
'joinedDate': '2022-01-01T00:00:00',
'giveToday': 50,
'giveTotal': 150
},
{
'user': {'discordId': 456, 'discordUsername': 'User2'},
'user': {'discordId': 456, 'discordUserName': 'User2'},
'role': 'MEMBER',
'joinedDate': '2022-01-02T00:00:00',
'giveToday': 100,
Expand Down

0 comments on commit 5eeacc2

Please sign in to comment.