fix issues

This commit is contained in:
yanghao05
2023-02-01 18:50:59 +08:00
parent 5dd54b923d
commit 384677f071
9 changed files with 89 additions and 39 deletions

View File

@@ -9,14 +9,14 @@ import (
)
type Route struct {
controller controller.Controller
svc *http.Service
captcha controller.CaptchaController
svc *http.Service
}
func NewRoute(c controller.Controller, svc *http.Service) contracts.Route {
return &Route{controller: c, svc: svc}
func NewRoute(captcha controller.CaptchaController, svc *http.Service) contracts.Route {
return &Route{captcha: captcha, svc: svc}
}
func (r *Route) Register() {
r.svc.Engine.GET("/name", gen.DataFunc(r.controller.GetName))
r.svc.Engine.GET("/captcha", gen.DataFunc(r.captcha.GetName))
}