mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
fixes
This commit is contained in:
@@ -14,7 +14,7 @@ import (
|
||||
"github.com/swiftyos/market/utils"
|
||||
)
|
||||
|
||||
func ListAgents(db *pgxpool.Pool) gin.HandlerFunc {
|
||||
func GetAgents(db *pgxpool.Pool) gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
logger := zap.L().With(zap.String("function", "ListAgents"))
|
||||
// Get pagination parameters from context
|
||||
@@ -247,7 +247,7 @@ func GetFeaturedAgents(db *pgxpool.Pool) gin.HandlerFunc {
|
||||
}
|
||||
}
|
||||
|
||||
func Search(db *pgxpool.Pool) gin.HandlerFunc {
|
||||
func SearchAgents(db *pgxpool.Pool) gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
logger := zap.L().With(zap.String("function", "Search"))
|
||||
logger.Info("Handling search request")
|
||||
|
||||
@@ -42,13 +42,13 @@ func main() {
|
||||
{
|
||||
agents := api.Group("/agents")
|
||||
{
|
||||
agents.GET("", handlers.ListAgents(db))
|
||||
agents.GET("", handlers.GetAgents(db))
|
||||
agents.GET("/:agent_id", handlers.GetAgentDetails(db))
|
||||
agents.GET("/:agent_id/download", handlers.DownloadAgent(db))
|
||||
agents.GET("/:agent_id/download-file", handlers.DownloadAgentFile(db))
|
||||
agents.GET("/top-downloads", handlers.TopAgentsByDownloads(db))
|
||||
agents.GET("/featured", handlers.GetFeaturedAgents(db))
|
||||
agents.GET("/search", handlers.Search(db))
|
||||
agents.GET("/search", handlers.SearchAgents(db))
|
||||
agents.POST("/submit", middleware.Auth(cfg), handlers.SubmitAgent(db))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user