mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-09 03:04:20 -04:00
Moving the crawler reference to the Controller Call
This commit is contained in:
parent
d28f976d2b
commit
7b080ce0df
@ -1,10 +1,5 @@
|
||||
using Kyoo.Controllers;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Kyoo.Controllers
|
||||
{
|
||||
@ -12,15 +7,8 @@ namespace Kyoo.Controllers
|
||||
[ApiController]
|
||||
public class AdminController : ControllerBase
|
||||
{
|
||||
private readonly ICrawler crawler;
|
||||
|
||||
public AdminController(ICrawler crawler)
|
||||
{
|
||||
this.crawler = crawler;
|
||||
}
|
||||
|
||||
[HttpGet("scan")]
|
||||
public IActionResult ScanLibrary()
|
||||
[HttpGet("scan")]
|
||||
public IActionResult ScanLibrary(ICrawler crawler)
|
||||
{
|
||||
crawler.StartAsync(new CancellationToken());
|
||||
return Ok("Scanning");
|
||||
|
Loading…
x
Reference in New Issue
Block a user