mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 00:54:47 -04:00
rename assert_params_in_request to assert_params_in_dict
the method "assert_params_in_request" does handle dicts and not requests. A request body has to be parsed to json before this method can be used
This commit is contained in:
parent
32fd6910d0
commit
3366b9c534
11 changed files with 33 additions and 33 deletions
|
@ -28,7 +28,7 @@ from synapse.api.errors import AuthError, Codes, SynapseError
|
|||
from synapse.api.filtering import Filter
|
||||
from synapse.events.utils import format_event_for_client_v2, serialize_event
|
||||
from synapse.http.servlet import (
|
||||
assert_params_in_request,
|
||||
assert_params_in_dict,
|
||||
parse_integer,
|
||||
parse_json_object_from_request,
|
||||
parse_string,
|
||||
|
@ -637,7 +637,7 @@ class RoomMembershipRestServlet(ClientV1RestServlet):
|
|||
|
||||
target = requester.user
|
||||
if membership_action in ["invite", "ban", "unban", "kick"]:
|
||||
assert_params_in_request(content, ["user_id"])
|
||||
assert_params_in_dict(content, ["user_id"])
|
||||
target = UserID.from_string(content["user_id"])
|
||||
|
||||
event_content = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue