mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-17 02:25:16 +00:00
Added latest changes and solved the conflicts
This commit is contained in:
@ -9,6 +9,24 @@ import 'package:syncrow_app/services/api/http_service.dart';
|
||||
class DevicesAPI {
|
||||
static final HTTPService _httpService = HTTPService();
|
||||
|
||||
static Future<Map<String, dynamic>> firmwareDevice(
|
||||
{required String deviceId, required String firmwareVersion}) async {
|
||||
try {
|
||||
final response = await _httpService.post(
|
||||
path: ApiEndpoints.firmwareDevice
|
||||
.replaceAll('{deviceUuid}', deviceId)
|
||||
.replaceAll('{firmwareVersion}', firmwareVersion),
|
||||
showServerMessage: false,
|
||||
expectedResponseModel: (json) {
|
||||
return json;
|
||||
},
|
||||
);
|
||||
return response;
|
||||
} catch (e) {
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
static Future<Map<String, dynamic>> controlDevice(
|
||||
DeviceControlModel controlModel, String deviceId) async {
|
||||
try {
|
||||
|
Reference in New Issue
Block a user