service/app/mix/controller/video_moderation_callback.go

29 lines
740 B
Go
Raw Normal View History

2024-04-26 10:46:37 +08:00
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
}
2024-04-27 11:14:44 +08:00
err = videomoderation.HandleVideoModerationContent(req.Content)
2024-04-26 10:46:37 +08:00
if err != nil {
2024-04-27 11:14:44 +08:00
logger.Error("HandleVideoModerationContent fail, req: %v, err: %v", util.ToJson(req), err)
2024-04-26 10:46:37 +08:00
return
}
ctx.String(200, "success")
}