From 535caf13243529fb7c5b6b1cfe9f8795e7d64e6b Mon Sep 17 00:00:00 2001 From: Bogdan Date: Tue, 17 Dec 2024 18:27:00 +0200 Subject: [PATCH] Add return type for artist/album lookup endpoint Closes #5282 --- src/Lidarr.Api.V1/Albums/AlbumLookupController.cs | 3 ++- src/Lidarr.Api.V1/Artist/ArtistLookupController.cs | 3 ++- src/Lidarr.Api.V1/Search/SearchController.cs | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Lidarr.Api.V1/Albums/AlbumLookupController.cs b/src/Lidarr.Api.V1/Albums/AlbumLookupController.cs index cd4e6b54a..e8853f611 100644 --- a/src/Lidarr.Api.V1/Albums/AlbumLookupController.cs +++ b/src/Lidarr.Api.V1/Albums/AlbumLookupController.cs @@ -20,7 +20,8 @@ namespace Lidarr.Api.V1.Albums } [HttpGet] - public object Search(string term) + [Produces("application/json")] + public IEnumerable Search(string term) { var searchResults = _searchProxy.SearchForNewAlbum(term, null); return MapToResource(searchResults).ToList(); diff --git a/src/Lidarr.Api.V1/Artist/ArtistLookupController.cs b/src/Lidarr.Api.V1/Artist/ArtistLookupController.cs index 27ff021a1..19a18a0ba 100644 --- a/src/Lidarr.Api.V1/Artist/ArtistLookupController.cs +++ b/src/Lidarr.Api.V1/Artist/ArtistLookupController.cs @@ -23,7 +23,8 @@ namespace Lidarr.Api.V1.Artist } [HttpGet] - public object Search([FromQuery] string term) + [Produces("application/json")] + public IEnumerable Search([FromQuery] string term) { var searchResults = _searchProxy.SearchForNewArtist(term); return MapToResource(searchResults).ToList(); diff --git a/src/Lidarr.Api.V1/Search/SearchController.cs b/src/Lidarr.Api.V1/Search/SearchController.cs index 9dc33066c..220afa064 100644 --- a/src/Lidarr.Api.V1/Search/SearchController.cs +++ b/src/Lidarr.Api.V1/Search/SearchController.cs @@ -24,7 +24,8 @@ namespace Lidarr.Api.V1.Search } [HttpGet] - public object Search([FromQuery] string term) + [Produces("application/json")] + public IEnumerable Search([FromQuery] string term) { var searchResults = _searchProxy.SearchForNewEntity(term); return MapToResource(searchResults).ToList();