document scraper logic and API refactor
This commit is contained in:
@@ -11,9 +11,14 @@ type DocumentScraperGetRequest struct {
|
||||
NoticeID string `param:"notice_id" valid:"required~Notice ID is required"`
|
||||
}
|
||||
|
||||
// DocumentScraperTenderResponse represents the response for a tender returned to the document scraper service
|
||||
// DocumentScraperTenderResponse represents the response for a tender returned to the document scraper service.
|
||||
//
|
||||
// ContractFolderID is the TED procedure identifier (BT-04 / ContractFolderID),
|
||||
// included so the scraper can build the MinIO upload path for this notice:
|
||||
//
|
||||
// PROC_<contract_folder_id>/<notice_publication_id>/<file>
|
||||
type DocumentScraperTenderResponse struct {
|
||||
ID string `json:"id"`
|
||||
ContractFolderID string `json:"contract_folder_id"`
|
||||
NoticePublicationID string `json:"notice_publication_id"`
|
||||
DocumentURL string `json:"document_url"`
|
||||
Title string `json:"title"`
|
||||
|
||||
@@ -41,7 +41,7 @@ func (s *service) buildTenderResponse(_ context.Context, t *tender.Tender) *Docu
|
||||
}
|
||||
|
||||
return &DocumentScraperTenderResponse{
|
||||
ID: t.ID.Hex(),
|
||||
ContractFolderID: t.ContractFolderID,
|
||||
NoticePublicationID: t.NoticePublicationID,
|
||||
DocumentURL: documentURL,
|
||||
Title: t.Title,
|
||||
|
||||
Reference in New Issue
Block a user