Skip to content

Commit

Permalink
修复驱动问题
Browse files Browse the repository at this point in the history
  • Loading branch information
18298001496 committed Sep 1, 2022
1 parent d4cbff1 commit cb073c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public async Task<IEnumerable<DataLocationDto>> GetAsync()

public async Task<IEnumerable<DataLocationDto>> GetNodeByIdAsync(string id)
{
List<DataLocationDto> results = new List<DataLocationDto>();
var model = await _repository.GetNodeByIdAsync(id).ConfigureAwait(false);
var node = from s in model
select s.ToModel<DataLocationModel, DataLocationDto>();
Expand All @@ -55,9 +56,10 @@ public async Task<IEnumerable<DataLocationDto>> GetNodeByIdAsync(string id)
dataLocation.Sink = locaton.Sink;
dataLocation.Status = locaton.Status;
}
results.Add(dataLocation);
}
}
return node;
return results;
}

public async Task<bool> Insert(DataLocationDto data)
Expand Down
2 changes: 1 addition & 1 deletion src/IOTCS.EdgeGateway.ResDriver/HttpDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public async Task<bool> Run(dynamic data)
var req = new RequestDto { ResourceId = "iotcs_test", Msg = JsonConvert.SerializeObject(data) };
restRequest.AddJsonBody<RequestDto>(req);
var response = await _httpClient.ExecuteAsync(restRequest).ConfigureAwait(false);
result = response.get_IsSuccessful();
result = response.IsSuccessful;
restRequest = null;

return result;
Expand Down

0 comments on commit cb073c6

Please sign in to comment.