diff options
author | Krombel <krombel@krombel.de> | 2018-07-13 21:53:01 +0200 |
---|---|---|
committer | Krombel <krombel@krombel.de> | 2018-07-13 21:53:01 +0200 |
commit | 3366b9c534cc286fcbe218ab718fd9a9c6211da4 (patch) | |
tree | c75be15b5880253c3c37ac23ad8421036e4e798b /synapse/http | |
parent | Use parse_{int,str} and assert from http.servlet (diff) | |
download | synapse-3366b9c534cc286fcbe218ab718fd9a9c6211da4.tar.xz |
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
Diffstat (limited to 'synapse/http')
-rw-r--r-- | synapse/http/servlet.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/http/servlet.py b/synapse/http/servlet.py index cf6723563a..882816dc8f 100644 --- a/synapse/http/servlet.py +++ b/synapse/http/servlet.py @@ -206,7 +206,7 @@ def parse_json_object_from_request(request, allow_empty_body=False): return content -def assert_params_in_request(body, required): +def assert_params_in_dict(body, required): absent = [] for k in required: if k not in body: |