fix: 修复摄像头无法正常启动,以及关闭摄像头会导致后端崩溃的问题
This commit is contained in:
@@ -146,7 +146,7 @@ public class VideoStreamController : ControllerBase
|
||||
}
|
||||
|
||||
[HttpPost("SetVideoStreamEnable")]
|
||||
[ProducesResponseType(typeof(object), StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(typeof(string), StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(typeof(string), StatusCodes.Status500InternalServerError)]
|
||||
public async Task<IActionResult> SetVideoStreamEnable(bool enable)
|
||||
{
|
||||
@@ -155,7 +155,7 @@ public class VideoStreamController : ControllerBase
|
||||
var boardId = TryGetBoardId().OrThrow(() => new ArgumentException("Board ID is required"));
|
||||
|
||||
await _videoStreamService.SetVideoStreamEnableAsync(boardId.ToString(), enable);
|
||||
return Ok($"HDMI transmission for board {boardId} disabled.");
|
||||
return Ok($"HDMI transmission for board {boardId} {enable.ToString()}.");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user