Tuer des bébés

This commit is contained in:
Victor Turgeon
2022-10-18 10:08:23 -04:00
parent 84e6bb9bc3
commit e5377fb35b
5 changed files with 21 additions and 3 deletions

View File

@@ -4,9 +4,11 @@ using System.Linq;
using GrossesMitainesAPI.Data;
using Microsoft.Extensions.Logging;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Cors;
namespace GrossesMitainesAPI.Controllers;
[EnableCors("_myAllowSpecificOrigins")]
[ApiController, Route("api/[controller]")]
public class SearchController : Controller {
private readonly ILogger<SearchController> _logger;
@@ -17,6 +19,7 @@ public class SearchController : Controller {
_context = context;
}
[EnableCors("_myAllowSpecificOrigins")]
[HttpPost(Name = "Search")]
public IEnumerable<Product> Post(string query, bool? preview) {
HashSet<Product> products = new();