mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-09 03:04:20 -04:00
Adding the FromServices modifier
This commit is contained in:
parent
7b080ce0df
commit
1eba074e1d
@ -8,7 +8,7 @@ namespace Kyoo.Controllers
|
|||||||
public class AdminController : ControllerBase
|
public class AdminController : ControllerBase
|
||||||
{
|
{
|
||||||
[HttpGet("scan")]
|
[HttpGet("scan")]
|
||||||
public IActionResult ScanLibrary(ICrawler crawler)
|
public IActionResult ScanLibrary([FromServices] ICrawler crawler)
|
||||||
{
|
{
|
||||||
crawler.StartAsync(new CancellationToken());
|
crawler.StartAsync(new CancellationToken());
|
||||||
return Ok("Scanning");
|
return Ok("Scanning");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user