提交 35c101a8 编写于 作者: 麦壳饼's avatar 麦壳饼

修改了测试的Token

上级 70a770f9
......@@ -7,7 +7,7 @@
}
},
"BrokerUri": "mqtt://127.0.0.1:1883/",
"AccessToken": "c1a9d84ecddf4b2abfe1375f83b12c42",
"AccessToken": "d65261e993384fe9a4f57a6477b7345c",
"ModBusList": [ "ModBusConfig" ]
}
\ No newline at end of file
......@@ -82,7 +82,7 @@ namespace IoTSharp.Controllers
[HttpGet("{deviceId}/AttributeLatest")]
public async Task<ActionResult<List<AttributeLatest>>> GetAttributeLatest(Guid deviceId)
{
var devid = from dev in _context.Device where dev.Id == deviceId select dev.AttributeLatest;
var devid = from dev in _context.Device.Include(d =>d.AttributeLatest) where dev.Id == deviceId select dev.AttributeLatest;
if (!devid.Any())
{
return NotFound(new ApiResult(ApiCode.NotFoundDeviceIdentity, $"Device's Identity not found "));
......@@ -99,7 +99,7 @@ namespace IoTSharp.Controllers
[HttpGet("{deviceId}/TelemetryLatest")]
public async Task<ActionResult<List<TelemetryLatest>>> GetTelemetryLatest(Guid deviceId)
{
var devid = from dev in _context.Device where dev.Id == deviceId select dev.TelemetryLatest;
var devid = from dev in _context.Device.Include(d=>d.TelemetryLatest) where dev.Id == deviceId select dev.TelemetryLatest;
if (!devid.Any())
{
return NotFound(new ApiResult(ApiCode.NotFoundDeviceIdentity, $"Device's Identity not found "));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册