diff --git a/src/FilterLists.Agent/Core/Interfaces/IUrlsRepository.cs b/src/FilterLists.Agent/Core/Interfaces/IUrlsRepository.cs index d7d352533..f3f8a7270 100644 --- a/src/FilterLists.Agent/Core/Interfaces/IUrlsRepository.cs +++ b/src/FilterLists.Agent/Core/Interfaces/IUrlsRepository.cs @@ -6,6 +6,6 @@ namespace FilterLists.Agent.Core.Interfaces { public interface IUrlsRepository { - Task> GetAllAsync(); + Task> GetAllAsync(); } } \ No newline at end of file diff --git a/src/FilterLists.Agent/Infrastructure/Repositories/UrlsRepository.cs b/src/FilterLists.Agent/Infrastructure/Repositories/UrlsRepository.cs index 175c99b46..1abb23e1e 100644 --- a/src/FilterLists.Agent/Infrastructure/Repositories/UrlsRepository.cs +++ b/src/FilterLists.Agent/Infrastructure/Repositories/UrlsRepository.cs @@ -18,20 +18,20 @@ public UrlsRepository(IFilterListsApiClient apiClient) _apiClient = apiClient; } - public async Task> GetAllAsync() + public async Task> GetAllAsync() { - var endpoint = BuildEndpoint(); + var endpoint = BuildEndpoint(); var request = new RestRequest(endpoint); - var response = await _apiClient.ExecuteAsync>(request); + var response = await _apiClient.ExecuteAsync>(request); return response.SelectMany(r => r.GetType().GetProperties().Where(p => p.GetType() == typeof(Uri)).Select(p => (Uri)p.GetValue(r))) .Where(u => u != null); } - private static string BuildEndpoint() + private static string BuildEndpoint() { string endpointSuffix; - switch (typeof(TEntityUrls).Name) + switch (typeof(TModel).Name) { case nameof(SyntaxUrls): endpointSuffix = "es"; @@ -44,7 +44,7 @@ private static string BuildEndpoint() break; } - return $"{typeof(TEntityUrls).Name.Replace("Urls", endpointSuffix).ToLowerInvariant()}/seed"; + return $"{typeof(TModel).Name.Replace("Urls", endpointSuffix).ToLowerInvariant()}/seed"; } } } \ No newline at end of file