mirror of
https://github.com/Jackett/Jackett
synced 2024-12-29 11:17:22 +00:00
core: API - "configured" parameter (#7120)
Add support for a "configured" parameter in the API 2.0. Only return configured indexers if true.
This commit is contained in:
parent
054e0e6440
commit
1715f0fda4
1 changed files with 2 additions and 1 deletions
|
@ -111,9 +111,10 @@ namespace Jackett.Server.Controllers
|
|||
|
||||
[HttpGet]
|
||||
[Route("")]
|
||||
public IEnumerable<Common.Models.DTO.Indexer> Indexers()
|
||||
public IEnumerable<Common.Models.DTO.Indexer> Indexers([FromQuery(Name = "configured")] bool configured)
|
||||
{
|
||||
var dto = IndexerService.GetAllIndexers().Select(i => new Common.Models.DTO.Indexer(i));
|
||||
dto = configured ? dto.Where(i => i.configured) : dto;
|
||||
return dto;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue