API for AI document scraper integration
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"tm/internal/company_category"
|
||||
"tm/internal/contact"
|
||||
"tm/internal/customer"
|
||||
"tm/internal/document_scraper"
|
||||
"tm/internal/feedback"
|
||||
"tm/internal/inquiry"
|
||||
"tm/internal/kanban"
|
||||
@@ -317,3 +318,16 @@ func RegisterPublicRoutes(e *echo.Echo, customerHandler *customer.Handler, tende
|
||||
publicFilesGP.DELETE("/:file_id", fileStoreHandler.Delete)
|
||||
}
|
||||
}
|
||||
|
||||
func RegisterDocumentScraperRoutes(e *echo.Echo, docScraperHandler *document_scraper.Handler, apiKey string) {
|
||||
v1 := e.Group("/api/v1/scraper")
|
||||
|
||||
// Apply API key middleware to all document scraper routes
|
||||
v1.Use(document_scraper.APIKeyMiddleware(apiKey))
|
||||
|
||||
// Document Scraper Routes
|
||||
{
|
||||
v1.GET("/tenders", docScraperHandler.ListPendingTenders)
|
||||
v1.GET("/tenders/:notice_id", docScraperHandler.GetTenderByNoticeID)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user