You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
818 B
34 lines
818 B
using System.Collections.Generic;
|
|
using Lidarr.Http;
|
|
using Lidarr.Http.REST;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using NzbDrone.Core.Tags;
|
|
|
|
namespace Lidarr.Api.V1.Tags
|
|
{
|
|
[V1ApiController("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]
|
|
[Produces("application/json")]
|
|
public List<TagDetailsResource> GetAll()
|
|
{
|
|
var tags = _tagService.Details().ToResource();
|
|
|
|
return tags;
|
|
}
|
|
}
|
|
}
|