feat: add quit-checkin v2 backend APIs
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
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("/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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user