summary refs log tree commit diff
path: root/synapse/rest/client/v2_alpha/devices.py
diff options
context:
space:
mode:
authorKrombel <krombel@krombel.de>2018-07-13 21:53:01 +0200
committerKrombel <krombel@krombel.de>2018-07-13 21:53:01 +0200
commit3366b9c534cc286fcbe218ab718fd9a9c6211da4 (patch)
treec75be15b5880253c3c37ac23ad8421036e4e798b /synapse/rest/client/v2_alpha/devices.py
parentUse parse_{int,str} and assert from http.servlet (diff)
downloadsynapse-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/rest/client/v2_alpha/devices.py')
-rw-r--r--synapse/rest/client/v2_alpha/devices.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/rest/client/v2_alpha/devices.py b/synapse/rest/client/v2_alpha/devices.py
index e346ad4ed6..aded2409be 100644
--- a/synapse/rest/client/v2_alpha/devices.py
+++ b/synapse/rest/client/v2_alpha/devices.py
@@ -19,7 +19,7 @@ from twisted.internet import defer
 
 from synapse.api import errors
 from synapse.http.servlet import (
-    assert_params_in_request,
+    assert_params_in_dict,
     parse_json_object_from_request,
     RestServlet
 )
@@ -81,7 +81,7 @@ class DeleteDevicesRestServlet(RestServlet):
             else:
                 raise e
 
-        assert_params_in_request(body, ["devices"])
+        assert_params_in_dict(body, ["devices"])
 
         yield self.auth_handler.validate_user_via_ui_auth(
             requester, body, self.hs.get_ip_from_request(request),