fd097729d7
- 成就系统、连续打卡天数计算、管理后台成就 CRUD - 梦想目标图标预设 DreamPreset 与用户端 dream-presets 接口 - 管理后台梦想图标 CRUD;戒烟打卡 summary 修正 - 忽略根目录编译产物 /api Made-with: Cursor
33 lines
994 B
Go
33 lines
994 B
Go
package routes
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
|
|
quitcheckinhandler "wx_service/internal/quitcheckin/handler"
|
|
)
|
|
|
|
// registerQuitCheckinRoutes 用于注册 V2 无烟打卡相关接口。
|
|
func registerQuitCheckinRoutes(protected *gin.RouterGroup, handler *quitcheckinhandler.Handler) {
|
|
v2 := protected.Group("")
|
|
{
|
|
v2.GET("/profile", handler.GetProfile)
|
|
v2.POST("/profile", handler.UpsertProfile)
|
|
|
|
v2.GET("/checkin/home", handler.Home)
|
|
v2.POST("/checkin/check", handler.Checkin)
|
|
v2.POST("/checkin/relapse", handler.Relapse)
|
|
|
|
v2.GET("/stats/overview", handler.StatsOverview)
|
|
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)
|
|
|
|
v2.GET("/poster/data", handler.PosterData)
|
|
v2.POST("/poster/generate", handler.GeneratePoster)
|
|
}
|
|
}
|