Files
syncrow-app/lib/services/api/devices_api.dart
2024-03-14 01:14:54 +03:00

19 lines
578 B
Dart

import 'package:syncrow_app/features/devices/model/device_control_model.dart';
import 'package:syncrow_app/services/api/api_links_endpoints.dart';
import 'package:syncrow_app/services/api/http_service.dart';
class DevicesAPI {
static Future<Map<String, dynamic>> controlDevice(
DeviceControlModel controlModel) async {
final response = await HTTPService().post(
path: ApiEndpoints.control,
body: controlModel.toJson(),
showServerMessage: false,
expectedResponseModel: (json) {
return json;
},
);
return response;
}
}