service/app/mix/controller/init_offline.go

21 lines
539 B
Go
Raw Normal View History

2024-05-23 22:39:37 +08:00
package controller
import (
video_moderation_proto "service/api/proto/video_moderation/proto"
"service/library/middleware"
"github.com/gin-gonic/gin"
)
func InitOffline(r *gin.Engine) {
r.HandleMethodNotAllowed = true
// websocket长链接
r.GET("/", ServeFile)
r.GET("/ws", HandleWs)
// 视频审核callback
extVideoModerationGroup := r.Group("/offline_ext/video_moderation")
extVideoModerationGroup.POST("callback", middleware.FORMParamValidator(video_moderation_proto.ExtVideoModerationReq{}), VideoModerationCallback)
}