big_model.go 824 B

1234567891011121314151617181920212223242526272829303132
  1. package router
  2. import (
  3. "github.com/gin-gonic/gin"
  4. jwt "github.com/go-admin-team/go-admin-core/sdk/pkg/jwtauth"
  5. "go-admin/app/observe/apis"
  6. "go-admin/common/middleware"
  7. )
  8. func init() {
  9. routerCheckRole = append(routerCheckRole, registerBigModelRouter)
  10. // routerNoCheckRole = append(routerNoCheckRole, registerBigModelRouterTest)
  11. }
  12. // registerOtAppsRouter
  13. func registerBigModelRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
  14. api := apis.BigModel{}
  15. r := v1.Group("/big-model").Use(authMiddleware.MiddlewareFunc()).Use(middleware.AuthCheckRole())
  16. {
  17. r.POST("/analyst", api.AiAnswerMe)
  18. }
  19. }
  20. // registerOtAppsRouter
  21. // func registerBigModelRouterTest(v1 *gin.RouterGroup) {
  22. // api := apis.BigModel{}
  23. // r := v1.Group("/big-model/test")
  24. // {
  25. // r.POST("/analyst", api.AiAnswerMe)
  26. // }
  27. // }