修复: B10路由使用正确的GatewayControlRequest DTO
This commit is contained in:
@@ -206,7 +206,7 @@ app.MapGet("/api/gateway/recordings/{adapter}/{deviceId}", async (string adapter
|
|||||||
});
|
});
|
||||||
|
|
||||||
// B10: 设备控制 — 下发控制指令(远程开门/抬杆/授权)
|
// B10: 设备控制 — 下发控制指令(远程开门/抬杆/授权)
|
||||||
app.MapPost("/api/gateway/control/{adapter}", async (string adapter, ControlRequest req) =>
|
app.MapPost("/api/gateway/control/{adapter}", async (string adapter, GatewayControlRequest req) =>
|
||||||
{
|
{
|
||||||
var a = registry.FindByCode<IAcceptsControl>(adapter);
|
var a = registry.FindByCode<IAcceptsControl>(adapter);
|
||||||
if (a == null) return Results.NotFound(new { error = "CAPABILITY_NOT_SUPPORTED" });
|
if (a == null) return Results.NotFound(new { error = "CAPABILITY_NOT_SUPPORTED" });
|
||||||
|
|||||||
Reference in New Issue
Block a user