change method getDevicesByClient in class DeviceDao to use just one request