summary refs log tree commit diff
path: root/synapse/rest/admin
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2022-06-07 07:43:35 -0400
committerGitHub <noreply@github.com>2022-06-07 07:43:35 -0400
commit9dc3293e0b3a5cbf6fcc4a0cef7386b531190882 (patch)
tree97a293afac5f1b5e7649de833f2b6be5112b6e00 /synapse/rest/admin
parentPrevent breaking old sqlite's when media retention is enabled (#12977) (diff)
downloadsynapse-9dc3293e0b3a5cbf6fcc4a0cef7386b531190882.tar.xz
Consolidate the logic of delete_device/delete_devices. (#12970)
By always using delete_devices and sometimes passing a list
with a single device ID.

Previously these methods had gotten out of sync with each
other and it seems there's little benefit to the single-device
variant.
Diffstat (limited to 'synapse/rest/admin')
-rw-r--r--synapse/rest/admin/devices.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/rest/admin/devices.py b/synapse/rest/admin/devices.py
index cef46ba0dd..d934880102 100644
--- a/synapse/rest/admin/devices.py
+++ b/synapse/rest/admin/devices.py
@@ -80,7 +80,7 @@ class DeviceRestServlet(RestServlet):
         if u is None:
             raise NotFoundError("Unknown user")
 
-        await self.device_handler.delete_device(target_user.to_string(), device_id)
+        await self.device_handler.delete_devices(target_user.to_string(), [device_id])
         return HTTPStatus.OK, {}
 
     async def on_PUT(