42 lines
1.5 KiB
Go
42 lines
1.5 KiB
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.POST("/supervisor/invites", handler.CreateSupervisorInvite)
|
|
v2.POST("/supervisor/bind", handler.BindSupervisorInvite)
|
|
v2.POST("/supervisor/revoke", handler.RevokeSupervisorBinding)
|
|
v2.GET("/supervisor/overview", handler.GetSupervisorOverview)
|
|
v2.GET("/supervisor/status", handler.GetSupervisorStatus)
|
|
v2.GET("/supervisor/reminders/settings", handler.GetReminderSettings)
|
|
v2.PUT("/supervisor/reminders/settings", handler.UpdateReminderSettings)
|
|
v2.POST("/supervisor/reminders/run", handler.RunReminders)
|
|
|
|
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)
|
|
}
|
|
}
|