added AI auto-generated keywords to customer profile
This commit is contained in:
@@ -216,13 +216,19 @@ func (h *TenderHandler) GetPublicTenders(c echo.Context) error {
|
||||
|
||||
form.Status = []string{string(TenderStatusActive)}
|
||||
|
||||
// Get company ID from customer context for automatic matching
|
||||
// Get company ID and customer ID from customer context for automatic matching
|
||||
var companyID *string
|
||||
if customerCompanyID, ok := c.Get("company_id").(string); ok {
|
||||
companyID = &customerCompanyID
|
||||
}
|
||||
form.CompanyID = companyID
|
||||
|
||||
var customerID *string
|
||||
if customerIDStr, ok := c.Get("customer_id").(string); ok {
|
||||
customerID = &customerIDStr
|
||||
}
|
||||
form.CustomerID = customerID
|
||||
|
||||
result, err := h.service.Search(c.Request().Context(), form, response.NewPagination(c))
|
||||
if err != nil {
|
||||
return response.InternalServerError(c, "Failed to retrieve tenders")
|
||||
@@ -277,9 +283,14 @@ func (h *TenderHandler) RecommendTenders(c echo.Context) error {
|
||||
if customerCompanyID, ok := c.Get("company_id").(string); ok {
|
||||
companyID = &customerCompanyID
|
||||
}
|
||||
|
||||
form.CompanyID = companyID
|
||||
|
||||
var customerID *string
|
||||
if customerIDStr, ok := c.Get("customer_id").(string); ok {
|
||||
customerID = &customerIDStr
|
||||
}
|
||||
form.CustomerID = customerID
|
||||
|
||||
result, err := h.service.Recommend(c.Request().Context(), form, response.NewPagination(c))
|
||||
if err != nil {
|
||||
return response.InternalServerError(c, "Failed to retrieve tenders")
|
||||
|
||||
Reference in New Issue
Block a user