mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
moved seriesmodule to restmodule
This commit is contained in:
parent
4afec69c79
commit
d85b825e06
11 changed files with 142 additions and 43 deletions
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();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue