feat: account.
This commit is contained in:
@ -23,7 +23,7 @@ func SetupRouter() *gin.Engine {
|
||||
records.POST("/analysis-by-ai", trainingController.AnalyzeByAI)
|
||||
// 可扩展其他路由:GET, PUT, DELETE等
|
||||
}
|
||||
steps := v1.Group("/step") //.Use(middleware.AuthMiddleware())
|
||||
steps := v1.Group("/step").Use(middleware.JWTAuth())
|
||||
{
|
||||
steps.POST("", stepTrainController.CreateTrainingRecord)
|
||||
steps.GET("train-records", stepTrainController.GetTrainingRecords)
|
||||
@ -31,6 +31,11 @@ func SetupRouter() *gin.Engine {
|
||||
steps.GET("train-rank/:trainId", stepTrainController.GetTrainingRank)
|
||||
// 可扩展其他路由:GET, PUT, DELETE等
|
||||
}
|
||||
public := v1.Group("")
|
||||
{
|
||||
public.POST("/register", controllers.Register)
|
||||
public.POST("/login", controllers.Login)
|
||||
}
|
||||
auth := v1.Group("/auth")
|
||||
{
|
||||
auth.GET("/token", func(c *gin.Context) {
|
||||
|
||||
Reference in New Issue
Block a user