Files

19 lines
564 B
Go
Raw Permalink Normal View History

package router
import (
"github.com/Tencent/WeKnora/internal/handler"
"github.com/gin-gonic/gin"
)
func RegisterKnowledgeClassificationRoutes(r *gin.RouterGroup, h *handler.KnowledgeClassificationHandler, g *rbacGuards) {
if h == nil {
return
}
group := r.Group("/knowledge-bases/:id/classification-jobs", g.OwnedKBOrAdmin(), g.KBAccessWrite("id"))
// Human review is required; intentionally unavailable to machine API keys.
group.GET("", h.List)
group.POST("", h.Create)
group.POST("/:job_id/apply", h.Apply)
group.POST("/:job_id/retry", h.Retry)
}