Add field total to device list in admin API (#8644)

This commit is contained in:
Dirk Klimpel 2020-10-26 15:07:51 +01:00 committed by GitHub
parent 7b13780c54
commit 913f8a06e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 2 deletions

View file

@ -119,7 +119,7 @@ class DevicesRestServlet(RestServlet):
raise NotFoundError("Unknown user")
devices = await self.device_handler.get_devices_by_user(target_user.to_string())
return 200, {"devices": devices}
return 200, {"devices": devices, "total": len(devices)}
class DeleteDevicesRestServlet(RestServlet):