Skip to content

Commit

Permalink
feat: status_codeが204の場合Trueを返すように
Browse files Browse the repository at this point in the history
  • Loading branch information
yupix committed Dec 25, 2022
1 parent 1d6e094 commit fe403a8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mipac/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ async def request(self, route: Route, auth: bool = False, **kwargs) -> R:
]
if isinstance(data, dict):
data = upper_to_lower(data)
if res.status == 204 and data is None:
return True # type: ignore
if 300 > res.status >= 200:
return data # type: ignore
if 511 > res.status >= 300:
Expand Down

0 comments on commit fe403a8

Please sign in to comment.