Initial commit

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-15 13:57:10 +08:00
co-authored by Claude Opus 5
commit 8679200f41
1897 changed files with 257900 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
package router
import (
"testing"
"github.com/gin-gonic/gin"
)
func TestVideoPlayConsumeRoute(t *testing.T) {
gin.SetMode(gin.TestMode)
engine := gin.New()
vidRouter(engine.Group("/api/app"))
foundConsume := false
foundLegacyCount := false
for _, route := range engine.Routes() {
if route.Method == "POST" && route.Path == "/api/app/vid/play/consume" {
foundConsume = true
}
if route.Method == "GET" && route.Path == "/api/app/vid/user/count" {
foundLegacyCount = true
}
}
if !foundConsume {
t.Error("POST /api/app/vid/play/consume is not registered")
}
if !foundLegacyCount {
t.Error("legacy GET /api/app/vid/user/count is not registered")
}
}