mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-11-27 10:24:55 +00:00
push remove try catch
This commit is contained in:
@ -13,18 +13,16 @@ class HomeManagementAPI {
|
|||||||
var userId = await storage.read(key: UserModel.userUuidKey) ?? '';
|
var userId = await storage.read(key: UserModel.userUuidKey) ?? '';
|
||||||
|
|
||||||
List<DeviceModel> list = [];
|
List<DeviceModel> list = [];
|
||||||
try {
|
|
||||||
await _httpService.get(
|
await _httpService.get(
|
||||||
path: ApiEndpoints.getDevicesByUserId.replaceAll("{userId}", userId),
|
path: ApiEndpoints.getDevicesByUserId.replaceAll("{userId}", userId),
|
||||||
showServerMessage: false,
|
showServerMessage: false,
|
||||||
expectedResponseModel: (json) {
|
expectedResponseModel: (json) {
|
||||||
json.forEach((value) {
|
json.forEach((value) {
|
||||||
list.add(DeviceModel.fromJson(value));
|
list.add(DeviceModel.fromJson(value));
|
||||||
});
|
|
||||||
});
|
});
|
||||||
} catch (e) {
|
});
|
||||||
rethrow;
|
|
||||||
}
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user