Add return type for movie lookup and import endpoints

Closes #10737
pull/10723/head
Bogdan 4 months ago
parent 6ac9cca953
commit 64739712c6

@ -29,7 +29,9 @@ namespace Radarr.Api.V3.Movies
}
[HttpPost]
public object Import([FromBody] List<MovieResource> resource)
[Consumes("application/json")]
[Produces("application/json")]
public IEnumerable<MovieResource> Import([FromBody] List<MovieResource> resource)
{
var newMovies = resource.ToModel();

@ -54,7 +54,8 @@ namespace Radarr.Api.V3.Movies
}
[HttpGet("tmdb")]
public object SearchByTmdbId(int tmdbId)
[Produces("application/json")]
public MovieResource SearchByTmdbId(int tmdbId)
{
var availDelay = _configService.AvailabilityDelay;
var result = new Movie { MovieMetadata = _movieInfo.GetMovieInfo(tmdbId).Item1 };
@ -63,7 +64,8 @@ namespace Radarr.Api.V3.Movies
}
[HttpGet("imdb")]
public object SearchByImdbId(string imdbId)
[Produces("application/json")]
public MovieResource SearchByImdbId(string imdbId)
{
var result = new Movie { MovieMetadata = _movieInfo.GetMovieByImdbId(imdbId) };
@ -73,7 +75,8 @@ namespace Radarr.Api.V3.Movies
}
[HttpGet]
public object Search([FromQuery] string term)
[Produces("application/json")]
public IEnumerable<MovieResource> Search([FromQuery] string term)
{
var searchResults = _searchProxy.SearchForNewMovie(term);

Loading…
Cancel
Save