1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-09 12:32:31 +01:00

Cleaned up some validation

This commit is contained in:
Mark McDowall 2013-09-20 14:09:13 -07:00
parent a40ad82fa7
commit 5343bde070
3 changed files with 1 additions and 3 deletions

View File

@ -40,7 +40,7 @@ public ReleaseModule(IFetchAndParseRss rssFetcherAndParser,
GetResourceAll = GetReleases;
Post["/"] = x=> DownloadRelease(this.Bind<ReleaseResource>());
PostValidator.RuleFor(s => s.DownloadAllowed);
PostValidator.RuleFor(s => s.DownloadAllowed).Equal(true);
}
private Response DownloadRelease(ReleaseResource release)

View File

@ -29,7 +29,6 @@ public DownloadService(IProvideDownloadClient downloadClientProvider,
public void DownloadReport(RemoteEpisode remoteEpisode)
{
Ensure.That(() => remoteEpisode.Series).IsNotNull();
Ensure.That(() => remoteEpisode.Episodes).IsNotNull();
Ensure.That(() => remoteEpisode.Episodes).HasItems();
var downloadTitle = remoteEpisode.Release.Title;

View File

@ -62,7 +62,6 @@ public static IRestResponse ExecuteAndValidate(this IRestClient client, IRestReq
return client.Execute(request).ValidateResponse(client);
}
public static void AddQueryString(this IRestRequest request, string name, object value)
{
request.AddParameter(name, value.ToString(), ParameterType.GetOrPost);