service/app/mix/controller/init_offline.go

21 lines
539 B
Go

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)
}