mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 01:35:23 +00:00
finished adding tasks and removing them , added error handling
This commit is contained in:
@ -3,7 +3,7 @@ import 'dart:async';
|
||||
import 'package:syncrow_app/features/devices/model/device_category_model.dart';
|
||||
import 'package:syncrow_app/features/devices/model/device_control_model.dart';
|
||||
import 'package:syncrow_app/features/devices/model/device_model.dart';
|
||||
import 'package:syncrow_app/features/devices/model/functions.dart';
|
||||
import 'package:syncrow_app/features/devices/model/function_model.dart';
|
||||
import 'package:syncrow_app/services/api/api_links_endpoints.dart';
|
||||
import 'package:syncrow_app/services/api/http_service.dart';
|
||||
|
||||
@ -57,12 +57,12 @@ class DevicesAPI {
|
||||
}
|
||||
|
||||
/// Get Device Functions
|
||||
static Future<FunctionsEntity> deviceFunctions(String deviceId) async {
|
||||
static Future<FunctionModel> deviceFunctions(String deviceId) async {
|
||||
final response = await _httpService.get(
|
||||
path: ApiEndpoints.deviceFunctions.replaceAll('{deviceUuid}', deviceId),
|
||||
showServerMessage: false,
|
||||
expectedResponseModel: (json) {
|
||||
final functions = FunctionsEntity.fromJson(json);
|
||||
final functions = FunctionModel.fromJson(json);
|
||||
return functions;
|
||||
},
|
||||
);
|
||||
|
Reference in New Issue
Block a user