mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 22:57:21 +00:00
Fix bugs related to the user table, privacy policy, and table filter.
This commit is contained in:
@ -18,8 +18,7 @@ class UserPermissionApi {
|
||||
showServerMessage: true,
|
||||
expectedResponseModel: (json) {
|
||||
debugPrint('fetchUsers Response: $json');
|
||||
final List<dynamic> data =
|
||||
json['data'] ?? []; // Default to an empty list if no data
|
||||
final List<dynamic> data = json['data'] ?? [];
|
||||
return data.map((item) => RolesUserModel.fromJson(item)).toList();
|
||||
},
|
||||
);
|
||||
@ -119,7 +118,7 @@ class UserPermissionApi {
|
||||
);
|
||||
return response ?? 'Unknown error occurred';
|
||||
} on DioException catch (e) {
|
||||
final errorMessage = e.response?.data['error'];
|
||||
final errorMessage = e.response?.data['error']['message'];
|
||||
return errorMessage;
|
||||
} catch (e) {
|
||||
return e.toString();
|
||||
@ -205,7 +204,6 @@ class UserPermissionApi {
|
||||
.replaceAll("{invitedUserUuid}", userUuid),
|
||||
body: bodya,
|
||||
expectedResponseModel: (json) {
|
||||
print('changeUserStatusById==${json['success']}');
|
||||
return json['success'];
|
||||
},
|
||||
);
|
||||
@ -213,7 +211,6 @@ class UserPermissionApi {
|
||||
return response;
|
||||
} catch (e) {
|
||||
return false;
|
||||
print(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user