fix: 修复比特流下载失败的问题
This commit is contained in:
@@ -368,11 +368,8 @@ public class ExamController : ControllerBase
|
||||
[ProducesResponseType(StatusCodes.Status403Forbidden)]
|
||||
[ProducesResponseType(StatusCodes.Status404NotFound)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public IActionResult DeleteCommit(string commitId)
|
||||
public IActionResult DeleteCommit(Guid commitId)
|
||||
{
|
||||
if (!Guid.TryParse(commitId, out _))
|
||||
return BadRequest("提交记录ID格式不正确");
|
||||
|
||||
try
|
||||
{
|
||||
// 获取当前用户信息
|
||||
|
||||
@@ -137,7 +137,7 @@ public class JtagController : ControllerBase
|
||||
[ProducesResponseType(typeof(string), StatusCodes.Status400BadRequest)]
|
||||
[ProducesResponseType(typeof(Exception), StatusCodes.Status500InternalServerError)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
public IResult DownloadBitstream(string address, int port, string bitstreamId, CancellationToken cancelToken)
|
||||
public IResult DownloadBitstream(string address, int port, Guid bitstreamId, CancellationToken cancelToken)
|
||||
{
|
||||
logger.Info($"User {User.Identity?.Name} initiating bitstream download to device {address}:{port} using bitstream ID: {bitstreamId}");
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ public class ResourceController : ControllerBase
|
||||
|
||||
var resourceInfo = new ResourceInfo(result.Value);
|
||||
|
||||
logger.Info($"成功添加资源: {request.ResourceType}/{request.ResourcePurpose}/{file.FileName}");
|
||||
logger.Info($"成功添加资源: {request.ResourceType}/{request.ResourcePurpose}/{file.FileName} ID: {resourceInfo.ID}");
|
||||
return CreatedAtAction(nameof(GetResourceById), new { resourceId = resourceInfo.ID }, resourceInfo);
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -187,7 +187,7 @@ public class ResourceController : ControllerBase
|
||||
[ProducesResponseType(StatusCodes.Status400BadRequest)]
|
||||
[ProducesResponseType(StatusCodes.Status404NotFound)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public IActionResult GetResourceById(string resourceId)
|
||||
public IActionResult GetResourceById(Guid resourceId)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -231,7 +231,7 @@ public class ResourceController : ControllerBase
|
||||
[ProducesResponseType(StatusCodes.Status403Forbidden)]
|
||||
[ProducesResponseType(StatusCodes.Status404NotFound)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public IActionResult DeleteResource(string resourceId)
|
||||
public IActionResult DeleteResource(Guid resourceId)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -293,7 +293,7 @@ public class ResourceInfo
|
||||
/// <summary>
|
||||
/// 资源ID
|
||||
/// </summary>
|
||||
public string ID { get; set; } = string.Empty;
|
||||
public Guid ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 资源名称
|
||||
@@ -327,7 +327,7 @@ public class ResourceInfo
|
||||
|
||||
public ResourceInfo(Resource resource)
|
||||
{
|
||||
ID = resource.ID.ToString();
|
||||
ID = resource.ID;
|
||||
Name = resource.ResourceName;
|
||||
Type = resource.ResourceType;
|
||||
Purpose = resource.Purpose;
|
||||
|
||||
Reference in New Issue
Block a user