diff --git a/server/src/Controllers/VideoStreamController.cs b/server/src/Controllers/VideoStreamController.cs index fca04e3..63fa381 100644 --- a/server/src/Controllers/VideoStreamController.cs +++ b/server/src/Controllers/VideoStreamController.cs @@ -68,40 +68,6 @@ public class VideoStreamController : ControllerBase return boardId.ToString(); } - private Optional TryGetBoardId() - { - var userName = User.FindFirstValue(ClaimTypes.Name); - if (string.IsNullOrEmpty(userName)) - { - logger.Error("User name not found in claims."); - return Optional.None; - } - - var db = new AppDataConnection(); - if (db == null) - { - logger.Error("Database connection failed."); - return Optional.None; - } - - var userRet = db.GetUserByName(userName); - if (!userRet.IsSuccessful || !userRet.Value.HasValue) - { - logger.Error("User not found."); - return Optional.None; - } - - var user = userRet.Value.Value; - var boardId = user.BoardID; - if (boardId == Guid.Empty) - { - logger.Error("No board bound to this user."); - return Optional.None; - } - - return boardId.ToString(); - } - /// /// 获取 HTTP 视频流服务状态 /// @@ -414,12 +380,4 @@ public class VideoStreamController : ControllerBase [Range(480, 1080, ErrorMessage = "高度必须在480-1080范围内")] public int Height { get; set; } } - - public class AvailableResolutionsResponse - { - public int Width { get; set; } - public int Height { get; set; } - public string Name { get; set; } = string.Empty; - public string Value => $"{Width}x{Height}"; - } }