Skip to content

Commit

Permalink
feat!: ClientAdminAdActions の対象のIDを指定する引数を削除 #140
Browse files Browse the repository at this point in the history
  • Loading branch information
yupix committed Jun 19, 2024
1 parent 62d21e5 commit 520da59
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions mipac/actions/admins/ad.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,11 @@ async def update(
class ClientAdminAdActions(SharedAdminAdActions):
def __init__(self, ad_id: str, *, session: HTTPClient, client: ClientManager):
super().__init__(session=session, client=client)
self._ad_id: str = ad_id
self.__ad_id: str = ad_id

@override
async def delete(self, *, ad_id: str | None = None) -> bool:
ad_id = ad_id or self._ad_id

return await super().delete(ad_id=ad_id)
async def delete(self) -> bool:
return await super().delete(ad_id=self.__ad_id)

@override
async def update(
Expand All @@ -78,11 +76,7 @@ async def update(
expires_at: int,
starts_at: int,
day_of_week: int,
*,
ad_id: str | None = None,
) -> bool:
ad_id = ad_id or self._ad_id

return await super().update(
memo=memo,
url=url,
Expand All @@ -93,7 +87,7 @@ async def update(
expires_at=expires_at,
starts_at=starts_at,
day_of_week=day_of_week,
ad_id=ad_id,
ad_id=self.__ad_id,
)


Expand Down

0 comments on commit 520da59

Please sign in to comment.