Kavita/API/Extensions/FilterDtoExtensions.cs
Joseph Milazzo fd6fa2fce4
Bugfix/in progress (#452)
# Fixed
- Fixed: Fixed an issue in In Progress where it would not pull the series with correct pagination due to the unique situation with the query. All series that are in progress should now return. 
============================
* Fixed In Progress not showing for all series due to pagination bug

* Version bump
2021-07-29 19:57:06 -05:00

26 lines
643 B
C#

using System;
using System.Collections.Generic;
using API.DTOs.Filtering;
using API.Entities.Enums;
namespace API.Extensions
{
public static class FilterDtoExtensions
{
private static readonly IList<MangaFormat> AllFormats = Enum.GetValues<MangaFormat>();
public static IList<MangaFormat> GetSqlFilter(this FilterDto filter)
{
var format = filter.MangaFormat;
if (format != null)
{
return new List<MangaFormat>()
{
(MangaFormat) format
};
}
return AllFormats;
}
}
}