a5ca9a2784
- Updated relevant files to include provider registration, implementation, and metadata. - Enhanced frontend components to support provider management and configuration. - Added localization for new provider settings and messages. - Implemented backend repository methods for CRUD operations on web search providers.
25 lines
577 B
Go
25 lines
577 B
Go
package handler
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/Tencent/WeKnora/internal/types"
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
// WebSearchHandler handles legacy web search related requests
|
|
type WebSearchHandler struct{}
|
|
|
|
// NewWebSearchHandler creates a new web search handler
|
|
func NewWebSearchHandler() *WebSearchHandler {
|
|
return &WebSearchHandler{}
|
|
}
|
|
|
|
// GetProviders returns the list of available web search provider types
|
|
func (h *WebSearchHandler) GetProviders(c *gin.Context) {
|
|
c.JSON(http.StatusOK, gin.H{
|
|
"success": true,
|
|
"data": types.GetWebSearchProviderTypes(),
|
|
})
|
|
}
|