Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

A second batch of Pydantic models for rest/client/account.py #13687

Merged
merged 7 commits into from
Sep 7, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Relax length constraint on user_ids
David Robertson committed Sep 5, 2022

Unverified

No user is associated with the committer email.
commit b861950ea0bf514aa4045bd75000a69fd51761ae
5 changes: 1 addition & 4 deletions synapse/rest/client/account.py
Original file line number Diff line number Diff line change
@@ -845,10 +845,7 @@ def __init__(self, hs: "HomeServer"):
class PostBody(RequestBodyModel):
# TODO: we could validate that each user id is an mxid here, and/or parse it
# as a UserID
if TYPE_CHECKING:
user_ids: List[StrictStr]
else:
user_ids: conlist(item_type=StrictStr, min_items=1)
user_ids: List[StrictStr]

async def on_POST(self, request: SynapseRequest) -> Tuple[int, JsonDict]:
await self._auth.get_user_by_req(request)