mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-27 02:07:41 +00:00
16 lines
No EOL
450 B
C#
16 lines
No EOL
450 B
C#
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();
|
|
}
|
|
|
|
}
|
|
} |