重新整理思路

# Conflicts:
#	srv/cmd/gatekeeper/wire.go
#	srv/internal/application/appliceation.go
This commit is contained in:
qwe
2026-05-21 00:10:02 +08:00
parent c7601ed174
commit f62fd46939
10 changed files with 120 additions and 70 deletions

View File

@@ -35,8 +35,11 @@ func (app *Application) Stop() {
}
}
func NewApplication(ct Ctrl, p *sql.DB) *Application {
func NewApplication(cs []Ctrl, p *sql.DB) *Application {
route := gin.Default()
for _, ctrl := range cs {
ctrl.RegisterRoutes(route)
}
srv := &http.Server{
Addr: ":8443",
Handler: route,