Files
2025-11-03 09:28:49 +08:00

29 lines
1.1 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package course_content
import (
"github.com/JACKYMYPERSON/hldrCenter/config"
"github.com/JACKYMYPERSON/hldrCenter/internal/course_content/handler/course_content"
"github.com/gin-gonic/gin"
)
func Course_Content_Router(api *gin.RouterGroup, cfg *config.Config) {
// ------------ 课程内容模块 ------------
courseContents := api.Group("/course-content")
{
// 新增课程内容POST /api/course-content
courseContents.POST("", gin.WrapH(course_content.AddContentHandler(cfg)))
// 课程内容列表POST /api/course-content/list- 与视频案例列表接口风格统一用POST传参便于分页/筛选)
courseContents.POST("/list", gin.WrapH(course_content.GetContentListHandler(cfg)))
// 获取单个课程内容详情GET /api/course-content/:id
courseContents.GET("/:id", gin.WrapH(course_content.GetContentHandler(cfg)))
// 更新课程内容PUT /api/course-content
courseContents.PUT("", gin.WrapH(course_content.UpdateContentHandler(cfg)))
// 删除课程内容DELETE /api/course-content/:id
courseContents.DELETE("/:id", gin.WrapH(course_content.DeleteContentHandler(cfg)))
}
}