From 0e07a5996a880d25d81543445ca946b51b5fa581 Mon Sep 17 00:00:00 2001 From: alivender <13898766233@163.com> Date: Thu, 14 Aug 2025 15:08:41 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=90=88=E5=B9=B6=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/Controllers/VideoStreamController.cs | 42 ------------------- 1 file changed, 42 deletions(-) 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}"; - } }