diff --git a/src/FilterLists.Api/V1/Controllers/ListsController.cs b/src/FilterLists.Api/V1/Controllers/ListsController.cs index 03f707dba..4acbaef32 100644 --- a/src/FilterLists.Api/V1/Controllers/ListsController.cs +++ b/src/FilterLists.Api/V1/Controllers/ListsController.cs @@ -18,18 +18,6 @@ public ListsController(IMemoryCache memoryCache, SeedService seedService, Filter [HttpGet] public async Task Index() => Json(await MemoryCache.GetOrCreate("ListsController_Index", entry => - { - entry.AbsoluteExpirationRelativeToNow = MemoryCacheExpirationDefault; - return filterListService.GetAllSummariesAsync(); - })); - - /// - /// in development for https://github.com/collinbarrett/FilterLists/issues/505 - /// - [HttpGet] - [Route("alpha")] - public async Task Alpha() => - Json(await MemoryCache.GetOrCreate("ListsController_Alpha", entry => { entry.AbsoluteExpirationRelativeToNow = MemoryCacheExpirationDefault; return filterListService.GetIndexAsync(); diff --git a/src/FilterLists.Services/FilterList/FilterListService.cs b/src/FilterLists.Services/FilterList/FilterListService.cs index b60a964d9..73e6d8261 100644 --- a/src/FilterLists.Services/FilterList/FilterListService.cs +++ b/src/FilterLists.Services/FilterList/FilterListService.cs @@ -16,12 +16,6 @@ public FilterListService(FilterListsDbContext dbContext, IConfigurationProvider { } - public async Task> GetAllSummariesAsync() => - await DbContext.FilterLists - .OrderBy(l => l.Name) - .ProjectTo(MapConfig) - .ToListAsync(); - public async Task> GetIndexAsync() => await DbContext.FilterLists .OrderBy(l => l.Name) diff --git a/src/FilterLists.Services/FilterList/MappingProfiles/ListSummaryDtoMappingProfile.cs b/src/FilterLists.Services/FilterList/MappingProfiles/ListSummaryDtoMappingProfile.cs deleted file mode 100644 index 7bf43db9f..000000000 --- a/src/FilterLists.Services/FilterList/MappingProfiles/ListSummaryDtoMappingProfile.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System.Linq; -using AutoMapper; -using FilterLists.Services.FilterList.Models; -using JetBrains.Annotations; - -namespace FilterLists.Services.FilterList.MappingProfiles -{ - [UsedImplicitly] - public class ListSummaryDtoMappingProfile : Profile - { - public ListSummaryDtoMappingProfile() => - CreateMap() - .ForMember(dest => dest.Id, - opt => opt.MapFrom(src => - (int)src.Id)) - .ForMember(dest => dest.Languages, - opt => opt.MapFrom(src => - src.FilterListLanguages.Select(la => la.Language))) - .ForMember(dest => dest.SoftwareIds, - opt => opt.MapFrom(src => - src.Syntax - .SoftwareSyntaxes - .Select(ss => ss.Software) - .OrderBy(s => s.Name) - .Select(s => (int)s.Id))) - .ForMember(dest => dest.Tags, - opt => opt.MapFrom(src => - src.FilterListTags.Select(m => m.Tag))) - .ForMember(dest => dest.UpdatedDate, - opt => opt.MapFrom(src => - src.DiscontinuedDate ?? - (src.Snapshots.Count(s => s.WasSuccessful && s.Md5Checksum != null) >= 2 - ? src.Snapshots - .Where(s => s.WasSuccessful && s.Md5Checksum != null) - .Select(s => s.CreatedDateUtc) - .OrderByDescending(c => c) - .FirstOrDefault() - : null))); - } -} \ No newline at end of file diff --git a/src/FilterLists.Services/FilterList/Models/ListSummaryDto.cs b/src/FilterLists.Services/FilterList/Models/ListSummaryDto.cs deleted file mode 100644 index 1dab81f2f..000000000 --- a/src/FilterLists.Services/FilterList/Models/ListSummaryDto.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using JetBrains.Annotations; - -namespace FilterLists.Services.FilterList.Models -{ - [UsedImplicitly] - public class ListSummaryDto - { - public int Id { get; set; } - public IEnumerable Languages { get; set; } - public string Name { get; set; } - public IEnumerable SoftwareIds { get; set; } - public IEnumerable Tags { get; set; } - public DateTime? UpdatedDate { get; set; } - } -} \ No newline at end of file diff --git a/src/FilterLists.Web/ClientApp/modules/home/HomeContainer.tsx b/src/FilterLists.Web/ClientApp/modules/home/HomeContainer.tsx index a70e8027c..b1e45eefc 100644 --- a/src/FilterLists.Web/ClientApp/modules/home/HomeContainer.tsx +++ b/src/FilterLists.Web/ClientApp/modules/home/HomeContainer.tsx @@ -32,7 +32,7 @@ export class HomeContainer extends React.Component<{}, IState> { }; fetchLists() { - fetch("https://filterlists.com/api/v1/lists/alpha") + fetch("https://filterlists.com/api/v1/lists") .then(r => r.json() as Promise) .then(d => { this.setState({ lists: d }); }); };