mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-11-26 22: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) ?? '';
|
||||
|
||||
List<DeviceModel> list = [];
|
||||
try {
|
||||
await _httpService.get(
|
||||
path: ApiEndpoints.getDevicesByUserId.replaceAll("{userId}", userId),
|
||||
showServerMessage: false,
|
||||
expectedResponseModel: (json) {
|
||||
json.forEach((value) {
|
||||
list.add(DeviceModel.fromJson(value));
|
||||
});
|
||||
|
||||
await _httpService.get(
|
||||
path: ApiEndpoints.getDevicesByUserId.replaceAll("{userId}", userId),
|
||||
showServerMessage: false,
|
||||
expectedResponseModel: (json) {
|
||||
json.forEach((value) {
|
||||
list.add(DeviceModel.fromJson(value));
|
||||
});
|
||||
} catch (e) {
|
||||
rethrow;
|
||||
}
|
||||
});
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user