feat: hr save.
This commit is contained in:
@ -7,11 +7,15 @@ import (
|
||||
|
||||
func SetupRouter() *gin.Engine {
|
||||
r := gin.Default()
|
||||
trainingController := controllers.NewTrainingController()
|
||||
|
||||
api := r.Group("/api/v1")
|
||||
v1 := r.Group("/api/v1")
|
||||
{
|
||||
api.POST("/training", controllers.ReceiveTrainingData)
|
||||
records := v1.Group("/train-records")
|
||||
{
|
||||
records.POST("", trainingController.CreateTrainingRecord)
|
||||
// 可扩展其他路由:GET, PUT, DELETE等
|
||||
}
|
||||
}
|
||||
|
||||
return r
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user