feat(ECR-012–016): 合规、题库、时辰刷新、头像、MBTI OEJTS 与埋点
落地输入合规、探索题库、报告日/时辰刷新、账号头像、OEJTS 量表,并补齐 H5 埋点与 Admin 漏斗;同步 ESS 工件、切至自建 Git、清理 GitHub Actions。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -54,7 +54,7 @@ func NewRouter(pool *pgxpool.Pool, cfg config.Config) *gin.Engine {
|
||||
membershipSvc := &membership.Service{Reports: reportRepo}
|
||||
relationSvc := &relation.Service{Profiles: profileRepo, Reports: reportRepo, Relations: relationRepo}
|
||||
scaleRepo := &repository.ScaleRepo{Pool: pool}
|
||||
scaleSvc := &scale.Service{Repo: scaleRepo, Profiles: profileRepo}
|
||||
scaleSvc := &scale.Service{Repo: scaleRepo, Profiles: profileRepo, Membership: membershipSvc}
|
||||
askSvc := &ask.Service{Profiles: profileRepo, Reports: reportRepo, Ask: askRepo, LLM: llm}
|
||||
companionSvc := &companionsvc.Service{Moods: &repository.MoodRepo{Pool: pool}}
|
||||
imageCardSvc := &imagecardsvc.Service{
|
||||
@@ -64,6 +64,7 @@ func NewRouter(pool *pgxpool.Pool, cfg config.Config) *gin.Engine {
|
||||
}
|
||||
homeSvc := &homesvc.Service{
|
||||
Repo: &repository.HomeToolsRepo{Pool: pool},
|
||||
Tips: &repository.HomeDailyTipsRepo{Pool: pool},
|
||||
Profiles: profileRepo,
|
||||
LLM: llm,
|
||||
}
|
||||
@@ -71,7 +72,7 @@ func NewRouter(pool *pgxpool.Pool, cfg config.Config) *gin.Engine {
|
||||
adminSvc := &adminsvc.Service{
|
||||
Repo: adminRepo, Reports: reportRepo, Home: homeSvc, Scales: scaleRepo,
|
||||
}
|
||||
authSvc := &authsvc.Service{Repo: authRepo}
|
||||
authSvc := &authsvc.Service{Repo: authRepo, AvatarDir: "data/avatars"}
|
||||
if err := adminSvc.EnsureBootstrap(context.Background(), adminsvc.BootstrapConfig{
|
||||
Username: cfg.Admin.BootstrapUsername,
|
||||
Password: cfg.Admin.BootstrapPassword,
|
||||
@@ -91,6 +92,7 @@ func NewRouter(pool *pgxpool.Pool, cfg config.Config) *gin.Engine {
|
||||
api.GET("/ping", func(c *gin.Context) {
|
||||
response.OK(c, gin.H{"pong": true})
|
||||
})
|
||||
(&handler.MediaHandler{AvatarDir: "data/avatars"}).Register(api)
|
||||
(&handler.AdminHandler{Svc: adminSvc, Analytics: analyticsSvc}).Register(api)
|
||||
|
||||
authed := api.Group("")
|
||||
@@ -109,7 +111,7 @@ func NewRouter(pool *pgxpool.Pool, cfg config.Config) *gin.Engine {
|
||||
(&handler.AskHandler{Svc: askSvc}).Register(gated)
|
||||
(&handler.CompanionHandler{Svc: companionSvc}).Register(gated)
|
||||
(&handler.ImageCardHandler{Svc: imageCardSvc}).Register(gated)
|
||||
(&handler.ExploreHandler{}).Register(gated)
|
||||
(&handler.ExploreHandler{Scales: scaleSvc}).Register(gated)
|
||||
(&handler.GrowthHandler{
|
||||
Plans: &repository.GrowthRepo{Pool: pool},
|
||||
}).Register(gated)
|
||||
|
||||
Reference in New Issue
Block a user