29 lines
740 B
Go
29 lines
740 B
Go
package controller
|
|
|
|
import (
|
|
video_moderation_proto "service/api/proto/video_moderation/proto"
|
|
"service/bizcommon/util"
|
|
videomoderation "service/library/contentaudit/video_moderation"
|
|
"service/library/logger"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func VideoModerationCallback(ctx *gin.Context) {
|
|
req := ctx.MustGet("client_req").(*video_moderation_proto.ExtVideoModerationReq)
|
|
|
|
err := videomoderation.VerifySign(req)
|
|
if err != nil {
|
|
logger.Error("VerifySign fail, req: %v, err: %v", util.ToJson(req), err)
|
|
return
|
|
}
|
|
|
|
err = videomoderation.HandleVideoModerationContent(req.Content)
|
|
if err != nil {
|
|
logger.Error("HandleVideoModerationContent fail, req: %v, err: %v", util.ToJson(req), err)
|
|
return
|
|
}
|
|
|
|
ctx.String(200, "success")
|
|
}
|