From 0411463b5113a92b55eca1b381468e772aa911bc Mon Sep 17 00:00:00 2001 From: minhphamm1309 Date: Thu, 20 Nov 2025 09:54:02 +0700 Subject: [PATCH] fix create event due to fastapi, instead of update embedding from server api --- .../Controllers/EventsController.cs | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/EventPlatform.WebApi/Controllers/EventsController.cs b/EventPlatform.WebApi/Controllers/EventsController.cs index b068846..d097c54 100644 --- a/EventPlatform.WebApi/Controllers/EventsController.cs +++ b/EventPlatform.WebApi/Controllers/EventsController.cs @@ -17,14 +17,10 @@ namespace EventPlatform.WebApi.Controllers public class EventsController : ControllerBase { private readonly IEventService _eventService; - private readonly HttpClient _httpClient; - private readonly IConfiguration _configuration; - public EventsController(IEventService eventService, HttpClient httpClient, IConfiguration configuration) + public EventsController(IEventService eventService) { _eventService = eventService; - _httpClient = httpClient; - _configuration = configuration; } /// Tham số tìm kiếm, lọc, phân trang @@ -97,14 +93,6 @@ public async Task CreateEvent([FromBody] CreateEventRequest create SaleEndDate = t.SaleEndDate, }).ToList(); await _eventService.CreateTicketTypes(newTicketTypes); - // Lấy Base URL từ cấu hình - var fastApiBaseUrl = UrlHelper.GetFastAPIUrl(_configuration); ; - - // Dựng URL cho action UPSERT - var fastApiUrl = $"{fastApiBaseUrl}/internal/events/manage/{newEvent.EventId}?action=UPSERT"; - - // Gửi yêu cầu POST (không cần body vì FastAPI sẽ tự lấy data từ CSDL) - var response = await _httpClient.PostAsync(fastApiUrl, null); } catch (Exception ex) {