This commit is contained in:
toom1996
2026-08-26 19:40:16 +08:00
parent 30c9f21da4
commit a6724265ad
14 changed files with 400 additions and 101 deletions

View File

@ -78,6 +78,7 @@ func main() {
articleSvc = service.NewArticleService(articleRepo)
brandSvc = service.NewBrandService(brandRepo)
indexSvc = service.NewIndexService(brandRepo)
authSvc = service.NewAuthService(userRepo, jwtManager)
)
@ -108,7 +109,7 @@ func main() {
// 即便部署层误绑了 0.0.0.0,SSGToken 中间件也能作为最后一道闸。
ssgEngine := router.NewSSG(router.Options{
Config: cfg,
SSG: handler.NewSSGHandler(brandSvc, articleSvc),
SSG: handler.NewSSGHandler(brandSvc, indexSvc),
})
srvSSG := &http.Server{
Addr: ":" + cfg.Server.SSGPort,