moved seriesmodule to restmodule

This commit is contained in:
kay.one 2013-04-20 15:14:41 -07:00
commit d85b825e06
11 changed files with 142 additions and 43 deletions

View file

@ -0,0 +1,16 @@
using NzbDrone.Api.REST;
using NzbDrone.Api.Validation;
namespace NzbDrone.Api
{
public abstract class NzbDroneRestModule<TResource> : RestModule<TResource> where TResource : RestResource, new()
{
protected NzbDroneRestModule(string resource)
: base("/api/" + resource.Trim('/'))
{
PostValidator.RuleFor(r => r.Id).IsZero();
PutValidator.RuleFor(r => r.Id).ValidId();
}
}
}