mirror of
https://github.com/Readarr/Readarr
synced 2025-12-08 01:14:27 +01:00
Require ApiKey for all actions in SonarrImport
(cherry picked from commit 19b8fbe13bf584b915a05fe9fc87622adbaee0b7) Closes #2600
This commit is contained in:
parent
6af56f7a15
commit
2c36a6c25f
1 changed files with 17 additions and 19 deletions
|
|
@ -108,11 +108,11 @@ public override object RequestAction(string action, IDictionary<string, string>
|
|||
return new
|
||||
{
|
||||
options = devices.OrderBy(d => d.Name, StringComparer.InvariantCultureIgnoreCase)
|
||||
.Select(d => new
|
||||
{
|
||||
Value = d.Id,
|
||||
Name = d.Name
|
||||
})
|
||||
.Select(d => new
|
||||
{
|
||||
Value = d.Id,
|
||||
Name = d.Name
|
||||
})
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -123,28 +123,26 @@ public override object RequestAction(string action, IDictionary<string, string>
|
|||
return new
|
||||
{
|
||||
options = devices.OrderBy(d => d.Label, StringComparer.InvariantCultureIgnoreCase)
|
||||
.Select(d => new
|
||||
{
|
||||
Value = d.Id,
|
||||
Name = d.Label
|
||||
})
|
||||
.Select(d => new
|
||||
{
|
||||
Value = d.Id,
|
||||
Name = d.Label
|
||||
})
|
||||
};
|
||||
}
|
||||
|
||||
if (action == "getRootFolders")
|
||||
{
|
||||
Settings.Validate().Filter("ApiKey").ThrowOnError();
|
||||
|
||||
var remoteRootfolders = _readarrV1Proxy.GetRootFolders(Settings);
|
||||
var remoteRootFolders = _readarrV1Proxy.GetRootFolders(Settings);
|
||||
|
||||
return new
|
||||
{
|
||||
options = remoteRootfolders.OrderBy(d => d.Path, StringComparer.InvariantCultureIgnoreCase)
|
||||
.Select(d => new
|
||||
{
|
||||
value = d.Path,
|
||||
name = d.Path
|
||||
})
|
||||
options = remoteRootFolders.OrderBy(d => d.Path, StringComparer.InvariantCultureIgnoreCase)
|
||||
.Select(d => new
|
||||
{
|
||||
value = d.Path,
|
||||
name = d.Path
|
||||
})
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue