mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-05-24 00:52:23 -04:00
* Laying the foundation for the filter rework * Filtering by Genre is now possible. * Cleaned up code and preparing for People filtering * People filtering is hooked up for the frontend * Filtering now works. On Deck does not work with filtering currently due to a unique implementation. * More cleanup * Implemented the ability to reset the filters * Added a mobile drawer for filtering * Added some additional cases for NaturalSortComparer. Filter now uses a drawer on smaller screens. * Fixed a bug where backup service was not pointing to the correct directory. * Undid the fix, it's working as expected
32 lines
750 B
C#
32 lines
750 B
C#
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using API.Data;
|
|
using API.DTOs;
|
|
using API.DTOs.Metadata;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace API.Controllers;
|
|
|
|
|
|
public class MetadataController : BaseApiController
|
|
{
|
|
private readonly IUnitOfWork _unitOfWork;
|
|
|
|
public MetadataController(IUnitOfWork unitOfWork)
|
|
{
|
|
_unitOfWork = unitOfWork;
|
|
}
|
|
|
|
[HttpGet("genres")]
|
|
public async Task<ActionResult<IList<GenreTagDto>>> GetAllGenres()
|
|
{
|
|
return Ok(await _unitOfWork.GenreRepository.GetAllGenreDtosAsync());
|
|
}
|
|
|
|
[HttpGet("people")]
|
|
public async Task<ActionResult<IList<PersonDto>>> GetAllPeople()
|
|
{
|
|
return Ok(await _unitOfWork.PersonRepository.GetAllPeople());
|
|
}
|
|
}
|