feat: 合并冲突

This commit is contained in:
alivender 2025-08-14 15:08:41 +08:00
parent 4b2afe13db
commit 0e07a5996a
1 changed files with 0 additions and 42 deletions

View File

@ -68,40 +68,6 @@ public class VideoStreamController : ControllerBase
return boardId.ToString();
}
private Optional<string> TryGetBoardId()
{
var userName = User.FindFirstValue(ClaimTypes.Name);
if (string.IsNullOrEmpty(userName))
{
logger.Error("User name not found in claims.");
return Optional<string>.None;
}
var db = new AppDataConnection();
if (db == null)
{
logger.Error("Database connection failed.");
return Optional<string>.None;
}
var userRet = db.GetUserByName(userName);
if (!userRet.IsSuccessful || !userRet.Value.HasValue)
{
logger.Error("User not found.");
return Optional<string>.None;
}
var user = userRet.Value.Value;
var boardId = user.BoardID;
if (boardId == Guid.Empty)
{
logger.Error("No board bound to this user.");
return Optional<string>.None;
}
return boardId.ToString();
}
/// <summary>
/// 获取 HTTP 视频流服务状态
/// </summary>
@ -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}";
}
}