前三个点位所有功能已调通

This commit is contained in:
2024-11-08 15:37:36 +08:00
parent 239d542edc
commit 660ae1326f
13 changed files with 331 additions and 27 deletions

View File

@@ -0,0 +1,17 @@
package play
import (
"game-driver/internal/middleware"
"game-driver/internal/schema"
"game-driver/leaf"
"game-driver/pkg/utils"
"game-driver/pkg/video"
)
func OnlyVideo(c *leaf.Context) {
payload := leaf.Value[*schema.PlayModal](c, middleware.PayloadJSONKey)
if url, ok := payload.Game["video"]; ok {
_ = video.Play(c, utils.LinkVideo(url.(string)))
}
}