Clear a bit more

This commit is contained in:
2025-08-05 19:34:42 +07:00
parent 0c8c3de807
commit 2dcbcc3ef2
9 changed files with 143 additions and 136 deletions

View File

@@ -4,7 +4,6 @@ using Managing.Application.Abstractions.Repositories;
using Managing.Application.Abstractions.Services;
using Managing.Common;
using Managing.Domain.Accounts;
using Managing.Domain.Statistics;
using Managing.Domain.Users;
using Microsoft.Extensions.Logging;
@@ -18,7 +17,6 @@ public class UserService : IUserService
private readonly ILogger<UserService> _logger;
private readonly ICacheService _cacheService;
private readonly IGrainFactory _grainFactory;
private readonly IAgentSummaryRepository _agentSummaryRepository;
private string[] authorizedAddresses =
[
@@ -40,8 +38,7 @@ public class UserService : IUserService
IAccountService accountService,
ILogger<UserService> logger,
ICacheService cacheService,
IGrainFactory grainFactory,
IAgentSummaryRepository agentSummaryRepository)
IGrainFactory grainFactory)
{
_evmManager = evmManager;
_userRepository = userRepository;
@@ -49,7 +46,6 @@ public class UserService : IUserService
_logger = logger;
_cacheService = cacheService;
_grainFactory = grainFactory;
_agentSummaryRepository = agentSummaryRepository;
}
public async Task<User> Authenticate(string name, string address, string message, string signature)
@@ -252,19 +248,5 @@ public class UserService : IUserService
return await _userRepository.GetAllUsersAsync();
}
public async Task SaveOrUpdateAgentSummary(AgentSummary agentSummary)
{
try
{
await _agentSummaryRepository.SaveOrUpdateAsync(agentSummary);
_logger.LogInformation("AgentSummary saved/updated for user {UserId} with agent name {AgentName}",
agentSummary.UserId, agentSummary.AgentName);
}
catch (Exception ex)
{
_logger.LogError(ex, "Failed to save/update AgentSummary for user {UserId} with agent name {AgentName}",
agentSummary.UserId, agentSummary.AgentName);
throw;
}
}
}