mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Fixed: Priority validation for indexers and download clients
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using FluentValidation;
|
||||
using NzbDrone.Core.Download;
|
||||
using NzbDrone.SignalR;
|
||||
using Prowlarr.Http;
|
||||
@@ -13,6 +14,7 @@ namespace Prowlarr.Api.V1.DownloadClient
|
||||
public DownloadClientController(IBroadcastSignalRMessage signalRBroadcaster, IDownloadClientFactory downloadClientFactory)
|
||||
: base(signalRBroadcaster, downloadClientFactory, "downloadclient", ResourceMapper, BulkResourceMapper)
|
||||
{
|
||||
SharedValidator.RuleFor(c => c.Priority).InclusiveBetween(1, 50);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -21,6 +21,7 @@ namespace Prowlarr.Api.V1.Indexers
|
||||
.ValidId()
|
||||
.SetValidator(appProfileExistsValidator);
|
||||
|
||||
SharedValidator.RuleFor(c => c.Priority).InclusiveBetween(1, 50);
|
||||
SharedValidator.RuleFor(c => c.DownloadClientId).SetValidator(downloadClientExistsValidator);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user