mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-30 15:37:55 +02:00
moved seriesmodule to restmodule
This commit is contained in:
16
NzbDrone.Api/NzbDroneRestModule.cs
Normal file
16
NzbDrone.Api/NzbDroneRestModule.cs
Normal 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();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user