chore: 并入 iotlcm-openapi 历史到 openapi/(原提交 3b05d5a)
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.5iot.com/iotlcm-public/iotlcm-openapi/internal/service"
|
||||
|
||||
"github.com/gogf/gf/v2/net/ghttp"
|
||||
)
|
||||
|
||||
func InitRouter(ctx context.Context, s *ghttp.Server) {
|
||||
s.Group("/openapi/v3", func(group *ghttp.RouterGroup) {
|
||||
group.Middleware(
|
||||
service.Middleware().ApiCtx,
|
||||
service.Middleware().ApiAuth,
|
||||
service.Middleware().ResponseHandler,
|
||||
)
|
||||
Change(ctx, group)
|
||||
Query(ctx, group)
|
||||
})
|
||||
|
||||
s.Group("/route", func(group *ghttp.RouterGroup) {
|
||||
group.Middleware(
|
||||
service.Middleware().OldCtx,
|
||||
service.Middleware().OldAuth,
|
||||
service.Middleware().OldResponseHandler,
|
||||
)
|
||||
Route(ctx, group)
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user