framework1/route.go

23 lines
535 B
Go
Raw Normal View History

2024-10-16 16:53:09 +08:00
package main
2024-10-18 14:41:55 +08:00
import (
2024-10-18 17:21:19 +08:00
"github.com/Superdanda/hade/framework/gin"
2024-10-18 14:41:55 +08:00
)
2024-10-16 16:53:09 +08:00
2024-10-18 14:41:55 +08:00
func registerRouter(core *gin.Engine) {
core.Use(Test2(), Test3())
core.GET("/user/login", Test1(), UserLoginController)
2024-10-16 16:53:09 +08:00
subjectGroup := core.Group("/subject")
{
2024-10-18 14:41:55 +08:00
parentGroup := subjectGroup.Group("/parent")
parentGroup.Use(Test1())
{
parentGroup.DELETE("/:id", SubjectDelController)
parentGroup.PUT("/:id", SubjectUpdateController)
parentGroup.GET("/:id", SubjectUpdateController)
parentGroup.GET("/list/all", SubjectListController)
}
2024-10-16 16:53:09 +08:00
}
}