Skip to content

Commit

Permalink
Merge pull request #192 from nnsnodnb/remove-internal-status-code
Browse files Browse the repository at this point in the history
Remove internal.status_code
  • Loading branch information
nnsnodnb committed Jan 23, 2024
2 parents 489d9d9 + 6d1dcc1 commit fe07cb3
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 21 deletions.
4 changes: 1 addition & 3 deletions kalyke/clients/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from httpx import AsyncClient, Response

from ..exceptions import ApnsProviderException
from ..internal.status_code import StatusCode
from ..models import ApnsConfig, Payload


Expand All @@ -29,8 +28,7 @@ async def send_message(
request_url = self._make_url(device_token=device_token)
res = await self._send(client=client, url=request_url, data=data)

status_code = StatusCode(res.status_code)
if status_code.is_success:
if res.is_success:
return res.headers["apns-id"]

raise self._handle_error(error_json=res.json())
Expand Down
Empty file removed kalyke/internal/__init__.py
Empty file.
18 changes: 0 additions & 18 deletions kalyke/internal/status_code.py

This file was deleted.

0 comments on commit fe07cb3

Please sign in to comment.