mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 13:33:34 -07:00
can display server-side errors on the UI.
This commit is contained in:
parent
43baa2b86e
commit
9195dc6de5
7 changed files with 740 additions and 3 deletions
|
@ -6,6 +6,7 @@ using NzbDrone.Api.Mapping;
|
|||
using NzbDrone.Api.REST;
|
||||
using NzbDrone.Core.Indexers;
|
||||
using Omu.ValueInjecter;
|
||||
using FluentValidation;
|
||||
|
||||
namespace NzbDrone.Api.Indexers
|
||||
{
|
||||
|
@ -20,6 +21,12 @@ namespace NzbDrone.Api.Indexers
|
|||
CreateResource = CreateIndexer;
|
||||
UpdateResource = UpdateIndexer;
|
||||
DeleteResource = DeleteIndexer;
|
||||
|
||||
|
||||
SharedValidator.RuleFor(c => c.Name).NotEmpty();
|
||||
SharedValidator.RuleFor(c => c.Implementation).NotEmpty();
|
||||
|
||||
PostValidator.RuleFor(c => c.Fields).NotEmpty();
|
||||
}
|
||||
|
||||
private List<IndexerResource> GetAll()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue