From 520da59a4718433a68761da1aa87cfe9e2cec034 Mon Sep 17 00:00:00 2001 From: yupix Date: Wed, 19 Jun 2024 09:43:25 +0900 Subject: [PATCH] =?UTF-8?q?feat!:=20ClientAdminAdActions=20=E3=81=AE?= =?UTF-8?q?=E5=AF=BE=E8=B1=A1=E3=81=AEID=E3=82=92=E6=8C=87=E5=AE=9A?= =?UTF-8?q?=E3=81=99=E3=82=8B=E5=BC=95=E6=95=B0=E3=82=92=E5=89=8A=E9=99=A4?= =?UTF-8?q?=20#140?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mipac/actions/admins/ad.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/mipac/actions/admins/ad.py b/mipac/actions/admins/ad.py index 1573f9de..cc2371c0 100644 --- a/mipac/actions/admins/ad.py +++ b/mipac/actions/admins/ad.py @@ -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( @@ -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, @@ -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, )