Added more magic to fancy. it now automatically figures our response for PUT and POST based on request ID.

file name sample uses HTTP GET instead of post
This commit is contained in:
kay.one
2013-08-25 22:14:55 -07:00
parent 438e3199de
commit 4188946395
20 changed files with 135 additions and 198 deletions

View File

@@ -13,7 +13,7 @@ namespace NzbDrone.Api.Seasons
_seasonService = seasonService;
GetResourceAll = GetSeasons;
UpdateResource = SetMonitored;
UpdateResource = Update;
Post["/pass"] = x => SetSeasonPass();
}
@@ -27,14 +27,12 @@ namespace NzbDrone.Api.Seasons
return ToListResource<Season>(() => _seasonService.GetSeasonsBySeries(seriesId));
}
return ToListResource<Season>(() => _seasonService.GetAllSeasons());
return ToListResource(() => _seasonService.GetAllSeasons());
}
private SeasonResource SetMonitored(SeasonResource seasonResource)
private void Update(SeasonResource seasonResource)
{
_seasonService.SetMonitored(seasonResource.SeriesId, seasonResource.SeasonNumber, seasonResource.Monitored);
return seasonResource;
}
private List<SeasonResource> SetSeasonPass()