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.
This commit is contained in:
Patrick Cloke 2022-06-07 07:43:35 -04:00 committed by GitHub
parent c51f5b9592
commit 9dc3293e0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 12 additions and 48 deletions

View file

@ -147,7 +147,9 @@ class DeviceRestServlet(RestServlet):
can_skip_ui_auth=True,
)
await self.device_handler.delete_device(requester.user.to_string(), device_id)
await self.device_handler.delete_devices(
requester.user.to_string(), [device_id]
)
return 200, {}
async def on_PUT(