Initial commit
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"time"
|
||||
"videoweb/app/api/videoapi"
|
||||
"videoweb/app/middleware/templatecache"
|
||||
"videoweb/app/service/videoser"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"videoweb/app/api/home"
|
||||
_ "videoweb/app/docs"
|
||||
)
|
||||
|
||||
func videoRouter(r *gin.Engine) {
|
||||
r.GET("/api/app/video/list", videoapi.List)
|
||||
r.GET("/api/app/video/detail", videoapi.Detail)
|
||||
|
||||
r.GET("/tagcategory/cache", templatecache.WithCache(time.Minute*5), home.GetTagCategoryCache)
|
||||
|
||||
r.GET("/richtext/:id/", templatecache.WithCache(time.Minute*1), home.RichtextApi) // 富文本
|
||||
|
||||
r.GET("/h5/m3u8/*key", videoser.GetM3U8Ex)
|
||||
r.GET("/h5/vtt/*key", videoser.GetVTTEx)
|
||||
r.GET("/enkey/", videoser.Enkey)
|
||||
r.GET("/newenkey/", videoser.NewEnkey)
|
||||
r.GET("/lsjenkey", videoser.LsjEnkey)
|
||||
|
||||
r.GET("/urlRedirect/", templatecache.WithCache(time.Minute*1), home.UrlRedirect)
|
||||
|
||||
r.GET("/videoList", home.VideoListPage)
|
||||
r.GET("/videoDetail", home.VideoDetailPage)
|
||||
}
|
||||
Reference in New Issue
Block a user