successfully run facade

This commit is contained in:
2025-01-20 21:45:01 +08:00
parent 98273c7645
commit 19851da7f1
24 changed files with 435 additions and 1620 deletions
+3
View File
@@ -16,4 +16,7 @@ import (
// Register register routes based on the IDL 'api.${HTTP Method}' annotation.
func Register(r *server.Hertz) {
root := r.Group("/", rootMw()...)
root.POST("/login", append(_loginMw(), facade.Login)...)
root.POST("/register", append(_registerMw(), facade.Register)...)
}
@@ -5,3 +5,18 @@ package facade
import (
"github.com/cloudwego/hertz/pkg/app"
)
func rootMw() []app.HandlerFunc {
// your code...
return nil
}
func _loginMw() []app.HandlerFunc {
// your code...
return nil
}
func _registerMw() []app.HandlerFunc {
// your code...
return nil
}