mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
Fixed: Validation for IndexerId on Release API Endpoint
Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
This commit is contained in:
parent
d61ba76574
commit
9c9fec70d8
1 changed files with 2 additions and 0 deletions
|
@ -11,6 +11,7 @@ using NzbDrone.Core.Exceptions;
|
||||||
using NzbDrone.Core.Indexers;
|
using NzbDrone.Core.Indexers;
|
||||||
using NzbDrone.Core.IndexerSearch;
|
using NzbDrone.Core.IndexerSearch;
|
||||||
using NzbDrone.Core.Parser.Model;
|
using NzbDrone.Core.Parser.Model;
|
||||||
|
using NzbDrone.Core.Validation;
|
||||||
using Lidarr.Http.Extensions;
|
using Lidarr.Http.Extensions;
|
||||||
using HttpStatusCode = System.Net.HttpStatusCode;
|
using HttpStatusCode = System.Net.HttpStatusCode;
|
||||||
|
|
||||||
|
@ -46,6 +47,7 @@ namespace Lidarr.Api.V1.Indexers
|
||||||
Post["/"] = x => DownloadRelease(this.Bind<ReleaseResource>());
|
Post["/"] = x => DownloadRelease(this.Bind<ReleaseResource>());
|
||||||
|
|
||||||
PostValidator.RuleFor(s => s.DownloadAllowed).Equal(true);
|
PostValidator.RuleFor(s => s.DownloadAllowed).Equal(true);
|
||||||
|
PostValidator.RuleFor(s => s.IndexerId).ValidId();
|
||||||
PostValidator.RuleFor(s => s.Guid).NotEmpty();
|
PostValidator.RuleFor(s => s.Guid).NotEmpty();
|
||||||
|
|
||||||
_remoteAlbumCache = cacheManager.GetCache<RemoteAlbum>(GetType(), "remoteAlbums");
|
_remoteAlbumCache = cacheManager.GetCache<RemoteAlbum>(GetType(), "remoteAlbums");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue