Working search
This commit is contained in:
parent
271cf1f407
commit
2a572e8bc4
15 changed files with 217 additions and 39 deletions
|
|
@ -1,3 +1,4 @@
|
|||
using JellyGlass.Services;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace JellyGlass.Controllers;
|
||||
|
|
@ -7,15 +8,19 @@ namespace JellyGlass.Controllers;
|
|||
public class SearchController : ControllerBase
|
||||
{
|
||||
private ILogger<SearchController> _logger;
|
||||
private ISearchService _service;
|
||||
|
||||
public SearchController(ILogger<SearchController> logger)
|
||||
public SearchController(ILogger<SearchController> logger, ISearchService service)
|
||||
{
|
||||
_logger = logger;
|
||||
_service = service;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public async Task<IActionResult> handleSearch([FromQuery] string searchTerm)
|
||||
public async Task<IActionResult> handleSearch([FromQuery] string searchTerm, string serverId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
var results = await _service.Search(searchTerm, serverId);
|
||||
|
||||
return Ok(results);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue