get all tenders with documeents scraped API
This commit is contained in:
@@ -657,6 +657,32 @@ func (h *TenderHandler) TriggerPublicAITranslate(c echo.Context) error {
|
||||
return response.Success(c, result, "AI translation completed successfully")
|
||||
}
|
||||
|
||||
// ListTendersWithScrapedDocuments lists tenders that have scraped documents in the database
|
||||
// @Summary List tenders with scraped documents
|
||||
// @Description Lists database tenders whose contract_folder_id has documents in MinIO (PROC_<contract_folder_id>/…) and syncs scraped document metadata
|
||||
// @Tags Admin-Tenders
|
||||
// @Produce json
|
||||
// @Param limit query int false "Number of items per page (default: 10, max: 100)"
|
||||
// @Param offset query int false "Number of items to skip (default: 0)"
|
||||
// @Success 200 {object} response.APIResponse{data=TendersWithScrapedDocumentsResponse}
|
||||
// @Failure 400 {object} response.APIResponse
|
||||
// @Failure 500 {object} response.APIResponse
|
||||
// @Router /admin/v1/tenders/scraped-documents [get]
|
||||
// @Security BearerAuth
|
||||
func (h *TenderHandler) ListTendersWithScrapedDocuments(c echo.Context) error {
|
||||
pagination, err := response.NewPagination(c)
|
||||
if err != nil {
|
||||
return response.PaginationBadRequest(c, err)
|
||||
}
|
||||
|
||||
result, err := h.service.ListTendersWithScrapedDocuments(c.Request().Context(), pagination)
|
||||
if err != nil {
|
||||
return response.InternalServerError(c, "Failed to list tenders with scraped documents")
|
||||
}
|
||||
|
||||
return response.SuccessWithMeta(c, result, result.Metadata, "Tenders with scraped documents retrieved successfully")
|
||||
}
|
||||
|
||||
// GetAllAISummaries retrieves all AI-generated summaries from storage
|
||||
// @Summary Get all AI-generated tender summaries
|
||||
// @Description Retrieve all AI-generated summaries from the AI pipeline storage, including pending and completed ones
|
||||
|
||||
Reference in New Issue
Block a user