Skip to content

Commit

Permalink
🐞 fix: fix #1, release 0.1b7
Browse files Browse the repository at this point in the history
  • Loading branch information
SerinaNya committed Aug 22, 2023
1 parent 553d7cd commit 744823b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "yggdrasil-mc"
version = "0.1b6"
version = "0.1b7"
authors = [
{ name="Xiao_Jin", email="i@xiaojin233.cn" },
]
Expand Down
2 changes: 1 addition & 1 deletion src/yggdrasil_mc/ygg.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class YggdrasilPlayerUuidApi(model.YggdrasilPlayerUuidApiModel):
@classmethod
def get(cls, api_root: str, player_name: str):
resp = httpx.get(f"{api_root}/users/profiles/minecraft/{player_name}")
if resp.status_code == 204: # No content
if resp.status_code in [204, 404]: # No Content & Not Found
return cls(existed=False)
return cls.parse_raw(resp.text)

Expand Down
2 changes: 1 addition & 1 deletion src/yggdrasil_mc/ygg_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ async def get(cls, api_root: str, player_name: str):
resp = await client.get(
f"{api_root}/users/profiles/minecraft/{player_name}"
)
if resp.status_code == 204: # No content
if resp.status_code in [204, 404]: # No Content & Not Found
return cls(existed=False)
return cls.parse_raw(resp.text)

Expand Down

0 comments on commit 744823b

Please sign in to comment.