fix:修复注释错误
This commit is contained in:
@@ -109,10 +109,10 @@ public sealed class UsersController(IMediator mediator) : BaseApiController
|
||||
command = command with { UserId = userId };
|
||||
}
|
||||
|
||||
// 2. (空行后) 执行更新
|
||||
// 2. 执行更新
|
||||
var result = await mediator.Send(command, cancellationToken);
|
||||
|
||||
// 3. (空行后) 返回结果或 404
|
||||
// 3. 返回结果或 404
|
||||
return result == null
|
||||
? ApiResponse<UserDetailDto>.Error(ErrorCodes.NotFound, "用户不存在")
|
||||
: ApiResponse<UserDetailDto>.Ok(result);
|
||||
@@ -169,10 +169,10 @@ public sealed class UsersController(IMediator mediator) : BaseApiController
|
||||
command = command with { UserId = userId };
|
||||
}
|
||||
|
||||
// 2. (空行后) 执行状态变更
|
||||
// 2. 执行状态变更
|
||||
var result = await mediator.Send(command, cancellationToken);
|
||||
|
||||
// 3. (空行后) 返回结果或 404
|
||||
// 3. 返回结果或 404
|
||||
return result
|
||||
? ApiResponse.Success()
|
||||
: ApiResponse<object>.Error(ErrorCodes.NotFound, "用户不存在");
|
||||
|
||||
Reference in New Issue
Block a user