1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-22 07:42:28 +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] [HttpGet]
public object Search(string term) [Produces("application/json")]
public IEnumerable<AlbumResource> Search(string term)
{ {
var searchResults = _searchProxy.SearchForNewAlbum(term, null); var searchResults = _searchProxy.SearchForNewAlbum(term, null);
return MapToResource(searchResults).ToList(); return MapToResource(searchResults).ToList();

View file

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

View file

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