mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-06-06 23:24:14 -04:00
30 lines
775 B
C#
30 lines
775 B
C#
using Kyoo.InternalAPI;
|
|
using Kyoo.Models;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Kyoo.Controllers
|
|
{
|
|
[Route("api/[controller]")]
|
|
[ApiController]
|
|
public class CollectionController : ControllerBase
|
|
{
|
|
private readonly ILibraryManager libraryManager;
|
|
|
|
public CollectionController(ILibraryManager libraryManager)
|
|
{
|
|
this.libraryManager = libraryManager;
|
|
}
|
|
|
|
[HttpGet("{collectionSlug}")]
|
|
public ActionResult<Collection> GetShows(string collectionSlug)
|
|
{
|
|
Collection collection = libraryManager.GetCollection(collectionSlug);
|
|
|
|
if (collection == null)
|
|
return NotFound();
|
|
|
|
return collection;
|
|
}
|
|
}
|
|
} |