fix: 修复依赖注入问题

This commit is contained in:
橙子
2024-10-17 23:45:38 +08:00
parent 8a57bf52f9
commit 942868f17f
3 changed files with 19 additions and 4 deletions

View File

@@ -15,6 +15,11 @@ public class MiningPoolService : ApplicationService
{
private readonly MiningPoolManager _manager;
public MiningPoolService(MiningPoolManager manager)
{
_manager = manager;
}
/// <summary>
/// 内测-白嫖-获取自动挖矿卡
/// </summary>
@@ -29,10 +34,10 @@ public class MiningPoolService : ApplicationService
/// </summary>
/// <returns></returns>
[HttpGet("mining-pool")]
public async Task<MiningPoolGetOutput> GetMiningPoolContentAsync()
public async Task<MiningPoolGetOutput?> GetMiningPoolContentAsync()
{
var content = await _manager.GetMiningPoolContentAsync();
var output = content.Adapt<MiningPoolGetOutput>();
var output = content.Adapt<MiningPoolGetOutput?>();
return output;
}