This commit is contained in:
@@ -31,6 +31,19 @@ namespace WebNovelPortalAPI.Controllers
|
||||
return _scrapers.FirstOrDefault(i => i.MatchesUrl(novelUrl));
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[Route("{guid:guid}")]
|
||||
public async Task<Novel?> GetNovel(Guid guid)
|
||||
{
|
||||
return await _novelRepository.GetNovel(guid);
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public async Task<List<Novel>> GetNovels()
|
||||
{
|
||||
return (await _novelRepository.GetAllIncluded()).ToList();
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Route("scrapeNovel")]
|
||||
public async Task<IActionResult> ScrapeNovel(ScrapeNovelRequest request)
|
||||
|
||||
Reference in New Issue
Block a user