Skip to content

Commit 0675a02

Browse files
committed
feat: api/admin/accounts/find-by-email をサポート
1 parent 825a28e commit 0675a02

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

mipac/actions/admins/accounts.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from mipac.abstract.action import AbstractAction
66
from mipac.http import HTTPClient, Route
7-
from mipac.models.user import CreatedUser
7+
from mipac.models.user import CreatedUser, UserDetailedNotMe
88
from mipac.types.user import ICreatedUser
99

1010
if TYPE_CHECKING:
@@ -66,3 +66,12 @@ async def delete(self, *, user_id: str) -> bool:
6666
lower=True,
6767
)
6868
return bool(res)
69+
70+
async def find_by_email(self, email: str) -> UserDetailedNotMe:
71+
res = await self._session.request(
72+
Route("POST", "/api/admin/accounts/find-by-email"),
73+
json={"email": email},
74+
auth=True,
75+
lower=True,
76+
)
77+
return UserDetailedNotMe(res, client=self._client)

0 commit comments

Comments
 (0)