1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-21 23:32:27 +00:00

Add return type for artist/album lookup endpoint

Closes #5282
This commit is contained in:
Bogdan 2024-12-17 18:27:00 +02:00
parent eb3c7d6990
commit 535caf1324
3 changed files with 6 additions and 3 deletions

View file

@ -20,7 +20,8 @@ public AlbumLookupController(ISearchForNewAlbum searchProxy, IMapCoversToLocal c
}
[HttpGet]
public object Search(string term)
[Produces("application/json")]
public IEnumerable<AlbumResource> Search(string term)
{
var searchResults = _searchProxy.SearchForNewAlbum(term, null);
return MapToResource(searchResults).ToList();

View file

@ -23,7 +23,8 @@ public ArtistLookupController(ISearchForNewArtist searchProxy, IBuildFileNames f
}
[HttpGet]
public object Search([FromQuery] string term)
[Produces("application/json")]
public IEnumerable<ArtistResource> Search([FromQuery] string term)
{
var searchResults = _searchProxy.SearchForNewArtist(term);
return MapToResource(searchResults).ToList();

View file

@ -24,7 +24,8 @@ public SearchController(ISearchForNewEntity searchProxy, IBuildFileNames fileNam
}
[HttpGet]
public object Search([FromQuery] string term)
[Produces("application/json")]
public IEnumerable<SearchResource> Search([FromQuery] string term)
{
var searchResults = _searchProxy.SearchForNewEntity(term);
return MapToResource(searchResults).ToList();