feat: 戒烟成就、梦想图标预设、打卡统计与依赖注入调整
- 成就系统、连续打卡天数计算、管理后台成就 CRUD - 梦想目标图标预设 DreamPreset 与用户端 dream-presets 接口 - 管理后台梦想图标 CRUD;戒烟打卡 summary 修正 - 忽略根目录编译产物 /api Made-with: Cursor
This commit is contained in:
@@ -90,6 +90,21 @@ func registerAdminRoutes(
|
||||
protected.PUT("/smoke/motivation-quotes/:id", handler.UpdateSmokeMotivation)
|
||||
protected.DELETE("/smoke/motivation-quotes/:id", handler.DeleteSmokeMotivation)
|
||||
|
||||
protected.GET("/achievement/themes", handler.ListAchievementThemes)
|
||||
protected.GET("/achievement/themes/:id", handler.GetAchievementTheme)
|
||||
protected.POST("/achievement/themes", handler.CreateAchievementTheme)
|
||||
protected.PUT("/achievement/themes/:id", handler.UpdateAchievementTheme)
|
||||
protected.DELETE("/achievement/themes/:id", handler.DeleteAchievementTheme)
|
||||
protected.GET("/achievement/themes/:id/levels", handler.ListAchievementLevels)
|
||||
protected.POST("/achievement/levels", handler.CreateAchievementLevel)
|
||||
protected.PUT("/achievement/levels/:id", handler.UpdateAchievementLevel)
|
||||
protected.DELETE("/achievement/levels/:id", handler.DeleteAchievementLevel)
|
||||
|
||||
protected.GET("/dream-presets", handler.ListDreamPresets)
|
||||
protected.POST("/dream-presets", handler.CreateDreamPreset)
|
||||
protected.PUT("/dream-presets/:id", handler.UpdateDreamPreset)
|
||||
protected.DELETE("/dream-presets/:id", handler.DeleteDreamPreset)
|
||||
|
||||
protected.GET("/memberships/overview", handler.MembershipOverview)
|
||||
protected.GET("/memberships/redeem-codes", handler.ListMembershipRedeemCodes)
|
||||
protected.POST("/memberships/redeem-codes", handler.CreateMembershipRedeemCodes)
|
||||
|
||||
@@ -21,6 +21,7 @@ func registerQuitCheckinRoutes(protected *gin.RouterGroup, handler *quitcheckinh
|
||||
v2.GET("/badges", handler.ListBadges)
|
||||
v2.GET("/relapses", handler.ListRelapses)
|
||||
|
||||
v2.GET("/dream-presets", handler.ListDreamPresets)
|
||||
v2.GET("/reward-goals", handler.ListRewardGoals)
|
||||
v2.POST("/reward-goals", handler.CreateRewardGoal)
|
||||
v2.PUT("/reward-goals/:id", handler.UpdateRewardGoal)
|
||||
|
||||
@@ -50,5 +50,9 @@ func registerSmokeRoutes(protected *gin.RouterGroup, smokeHandler *smokehandler.
|
||||
smoke.GET("/quit-plan", quitPlanHandler.GetQuitPlan)
|
||||
smoke.GET("/quit-plan/days", quitPlanHandler.GetQuitPlanDays)
|
||||
smoke.POST("/quit-plan/reset", quitPlanHandler.ResetQuitPlan)
|
||||
|
||||
// 成就系统
|
||||
smoke.GET("/achievement/themes", smokeHandler.ListAchievementThemes)
|
||||
smoke.GET("/achievement", smokeHandler.GetAchievement)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user