feat: step train.

This commit is contained in:
2025-06-25 09:36:27 +08:00
parent 8510d19baa
commit 4e10359a5b
4 changed files with 136 additions and 1 deletions

View File

@ -12,6 +12,7 @@ func SetupRouter() *gin.Engine {
r := gin.Default()
r.Use(middleware.GzipMiddleware())
trainingController := controllers.NewTrainingController()
stepTrainController := controllers.NewStepTrainingController()
v1 := r.Group("/api/v1")
{
@ -21,6 +22,11 @@ func SetupRouter() *gin.Engine {
records.GET("/analysis", trainingController.HandleCurveAnalysis)
// 可扩展其他路由GET, PUT, DELETE等
}
steps := v1.Group("/step") //.Use(middleware.AuthMiddleware())
{
steps.POST("", stepTrainController.CreateTrainingRecord)
// 可扩展其他路由GET, PUT, DELETE等
}
auth := v1.Group("/auth")
{
auth.GET("/token", func(c *gin.Context) {