using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Serwer.Infrastructure.Services; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace Serwer.Api.Controllers { [Route("api/[controller]")] [ApiController] public class SearchController : ControllerBase { private readonly ISearchService _searchService; public SearchController(ISearchService searchService) { _searchService = searchService; } [HttpGet("{query}")] public async Task Search(string query) { var results = await _searchService.Search(query); return Ok(results); } } }