Refactor Feedback Service to Include Tender Information in Responses

- Updated the FeedbackService to include a new dependency on TenderService, allowing feedback responses to include associated tender details.
- Modified the ListFeedback method to return a new FeedbackListWithTenderResponse type, which includes feedback along with tender information.
- Enhanced the feedback entity and form structures to support the new response format, improving the API's capability to provide comprehensive feedback data.
- Adjusted the main application initialization to reflect the changes in the feedback service dependencies.
This commit is contained in:
n.nakhostin
2025-09-02 11:31:59 +03:30
parent c684a12155
commit 8f909618d8
5 changed files with 106 additions and 23 deletions
+5 -5
View File
@@ -347,21 +347,21 @@ func (h *TenderHandler) RecommendTenders(c echo.Context) error {
companyID = &customerCompanyID
}
from := int64(0)
var from *int64
if fromParam := c.QueryParam("publication_from"); fromParam != "" {
if parsed, err := strconv.ParseInt(fromParam, 10, 64); err == nil {
from = parsed
from = &parsed
}
}
to := int64(0)
var to *int64
if toParam := c.QueryParam("publication_to"); toParam != "" {
if parsed, err := strconv.ParseInt(toParam, 10, 64); err == nil {
to = parsed
to = &parsed
}
}
result, err := h.service.RecommendTenders(c.Request().Context(), companyID, &from, &to, limit, offset)
result, err := h.service.RecommendTenders(c.Request().Context(), companyID, from, to, limit, offset)
if err != nil {
return response.InternalServerError(c, "Failed to retrieve tenders")
}