sendDelete method
- ServiceOfJournal serv
Delete service from remote DB.
Create request body and call _commitUrl.
Implementation
Future<(ServiceState?, String)> sendDelete(ServiceOfJournal serv) async {
//
// > create body of post request
//
final body = DeleteClientServiceRequest(
uuid: serv.uid,
serv_id: serv.servId,
contracts_id: serv.contractId,
dep_has_worker_id: serv.workerId,
).toJson();
//
// > send Post
//
final urlAddress = '${wKey.activeServer}/delete';
return _commitUrl(urlAddress, body: body);
}