Fix AgentName
This commit is contained in:
@@ -19,7 +19,7 @@ public class PostgreSqlUserRepository : BaseRepositoryWithLogging, IUserReposito
|
||||
_cacheService = cacheService;
|
||||
}
|
||||
|
||||
public async Task<User> GetUserByAgentNameAsync(string agentName)
|
||||
public async Task<User?> GetUserByAgentNameAsync(string agentName)
|
||||
{
|
||||
return await ExecuteWithLoggingAsync(async () =>
|
||||
{
|
||||
@@ -51,7 +51,7 @@ public class PostgreSqlUserRepository : BaseRepositoryWithLogging, IUserReposito
|
||||
.ConfigureAwait(false);
|
||||
|
||||
if (userEntity == null)
|
||||
throw new InvalidOperationException($"User with agent name '{agentName}' not found");
|
||||
return null;
|
||||
|
||||
var user = PostgreSqlMappers.Map(userEntity);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user