Cleaned up some validation

pull/3113/head
Mark McDowall 11 years ago
parent a40ad82fa7
commit 5343bde070

@ -40,7 +40,7 @@ namespace NzbDrone.Api.Indexers
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)

@ -29,7 +29,6 @@ namespace NzbDrone.Core.Download
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;

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

Loading…
Cancel
Save