mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-11-27 01:44:55 +00:00
Refactor API endpoint for getting device reports and fix the record title
This commit is contained in:
@ -569,6 +569,22 @@ class DevicesAPI {
|
||||
return response;
|
||||
}
|
||||
|
||||
static Future<DeviceReport> getReports(
|
||||
String uuid,
|
||||
String code,
|
||||
) async {
|
||||
final response = await HTTPService().get(
|
||||
path: ApiEndpoints.getReportLogs
|
||||
.replaceAll('{uuid}', uuid)
|
||||
.replaceAll('{code}', code),
|
||||
showServerMessage: false,
|
||||
expectedResponseModel: (json) {
|
||||
return DeviceReport.fromJson(json);
|
||||
},
|
||||
);
|
||||
return response;
|
||||
}
|
||||
|
||||
static Future<List<DeviceModel>> getAllDevices({
|
||||
required String communityUuid,
|
||||
required String spaceUuid,
|
||||
|
||||
Reference in New Issue
Block a user