mirror of
https://github.com/Prowlarr/Prowlarr
synced 2025-12-06 16:43:25 +01:00
Fixed: Priority validation for indexers and download clients
This commit is contained in:
parent
b99e8d0d65
commit
5125f256fb
2 changed files with 3 additions and 0 deletions
|
|
@ -1,3 +1,4 @@
|
|||
using FluentValidation;
|
||||
using NzbDrone.Core.Download;
|
||||
using NzbDrone.SignalR;
|
||||
using Prowlarr.Http;
|
||||
|
|
@ -13,6 +14,7 @@ public class DownloadClientController : ProviderControllerBase<DownloadClientRes
|
|||
public DownloadClientController(IBroadcastSignalRMessage signalRBroadcaster, IDownloadClientFactory downloadClientFactory)
|
||||
: base(signalRBroadcaster, downloadClientFactory, "downloadclient", ResourceMapper, BulkResourceMapper)
|
||||
{
|
||||
SharedValidator.RuleFor(c => c.Priority).InclusiveBetween(1, 50);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ public IndexerController(IBroadcastSignalRMessage signalRBroadcaster,
|
|||
.ValidId()
|
||||
.SetValidator(appProfileExistsValidator);
|
||||
|
||||
SharedValidator.RuleFor(c => c.Priority).InclusiveBetween(1, 50);
|
||||
SharedValidator.RuleFor(c => c.DownloadClientId).SetValidator(downloadClientExistsValidator);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue