You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
450 B
16 lines
450 B
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();
|
|
}
|
|
|
|
}
|
|
} |