mirror of https://github.com/Radarr/Radarr
31 lines
749 B
C#
31 lines
749 B
C#
using System.Collections.Generic;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using NzbDrone.Core.Tags;
|
|
using Radarr.Http;
|
|
using Radarr.Http.REST;
|
|
|
|
namespace Radarr.Api.V3.Tags
|
|
{
|
|
[V3ApiController("tag/detail")]
|
|
public class TagDetailsController : RestController<TagDetailsResource>
|
|
{
|
|
private readonly ITagService _tagService;
|
|
|
|
public TagDetailsController(ITagService tagService)
|
|
{
|
|
_tagService = tagService;
|
|
}
|
|
|
|
public override TagDetailsResource GetResourceById(int id)
|
|
{
|
|
return _tagService.Details(id).ToResource();
|
|
}
|
|
|
|
[HttpGet]
|
|
public List<TagDetailsResource> GetAll()
|
|
{
|
|
return _tagService.Details().ToResource();
|
|
}
|
|
}
|
|
}
|