Skip to content

Commit

Permalink
feat!: ClientAdminUserActions の対象のIDを指定する引数を削除 #140
Browse files Browse the repository at this point in the history
  • Loading branch information
yupix committed Jun 19, 2024
1 parent db28252 commit 69103b0
Showing 1 changed file with 9 additions and 30 deletions.
39 changes: 9 additions & 30 deletions mipac/actions/admins/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,59 +107,38 @@ def __init__(self, user_id: str, *, session: HTTPClient, client: ClientManager):
self.__user_id = user_id

@override
async def delete_account(self, *, user_id: str | None = None) -> bool:
user_id = user_id or self.__user_id

return await super().delete_account(user_id=user_id)
async def delete_account(self) -> bool:
return await super().delete_account(user_id=self.__user_id)

@override
async def show_user(self, *, user_id: str | None = None):
"""ユーザーの情報を取得します
async def show_user(self):
"""ユーザーの情報を取得します"""

Parameters
----------
user_id : str
対象のユーザーID
"""
user_id = user_id or self.__user_id

return await super().show_user(user_id=user_id)
return await super().show_user(user_id=self.__user_id)

@override
async def suspend(self, *, user_id: str | None = None) -> bool:
async def suspend(self) -> bool:
"""対象のユーザーを凍結します
Parameters
----------
user_id : str
対象のユーザーID
Returns
-------
bool
成功ならTrue
"""
user_id = user_id or self.__user_id

return await super().suspend(user_id=user_id)
return await super().suspend(user_id=self.__user_id)

@override
async def unsuspend(self, *, user_id: str | None = None) -> bool:
async def unsuspend(self) -> bool:
"""ユーザーの凍結を解除します
Parameters
----------
user_id : str
対象のユーザーID
Returns
-------
bool
成功ならTrue
"""
user_id = user_id or self.__user_id

return await super().unsuspend(user_id=user_id)
return await super().unsuspend(user_id=self.__user_id)


class AdminUserActions(SharedAdminUserActions):
Expand Down

0 comments on commit 69103b0

Please sign in to comment.