mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-31 12:10:19 -07:00
Fixed: Incorrect api error when calling /api/episode without seriesId queryparam.
fixes #1070
This commit is contained in:
parent
5cfaed7b26
commit
2f50074123
3 changed files with 12 additions and 17 deletions
|
@ -20,14 +20,14 @@ namespace NzbDrone.Api.Episodes
|
|||
|
||||
private List<EpisodeResource> GetEpisodes()
|
||||
{
|
||||
var seriesId = (int?)Request.Query.SeriesId;
|
||||
|
||||
if (seriesId == null)
|
||||
if (!Request.Query.SeriesId.HasValue)
|
||||
{
|
||||
throw new BadRequestException("seriesId is missing");
|
||||
}
|
||||
|
||||
var resources = ToListResource(_episodeService.GetEpisodeBySeries(seriesId.Value));
|
||||
var seriesId = (int)Request.Query.SeriesId;
|
||||
|
||||
var resources = ToListResource(_episodeService.GetEpisodeBySeries(seriesId));
|
||||
|
||||
return resources;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue