New: Update Nancy to 2.0

This commit is contained in:
ta264 2019-09-12 21:32:51 +01:00
parent 425bd8964f
commit 17c9fc419c
44 changed files with 266 additions and 266 deletions

View file

@ -16,13 +16,13 @@ namespace Lidarr.Api.V1.Artist
: base("/artist/lookup")
{
_searchProxy = searchProxy;
Get["/"] = x => Search();
Get("/", x => Search());
}
private Response Search()
private object Search()
{
var searchResults = _searchProxy.SearchForNewArtist((string)Request.Query.term);
return MapToResource(searchResults).ToList().AsResponse();
return MapToResource(searchResults).ToList();
}
private static IEnumerable<ArtistResource> MapToResource(IEnumerable<NzbDrone.Core.Music.Artist> artist)