by Robin at 20240702

This commit is contained in:
Leufolium 2024-07-02 16:29:08 +08:00
parent 8d170ef8ef
commit c9e50ef864
1 changed files with 6 additions and 0 deletions

View File

@ -536,6 +536,9 @@ func (s *Service) ApiCreateMomentBusinessValidate(ctx *gin.Context, req *momentp
ec = errcode.ErrCodeMomentSrvOk
resultList := businessvalidator.NewAuthBusinessValidator(ctx, req).
QueryAccount(_DefaultAccount.OpListByMid).
EnsureAccountExist().
EnsureIsThisRole(consts.Streamer).
EnsureMediaIsSuccessfullyUploaded(req.Moment.MediaComp).
EnsureSuchAccountPunishmentNotExist(req.GetBaseRequest().Mid, consts.AccountPunishment_BlockFromCreatingMoment, _DefaultAccountPunishment.OpListByMidAndType).
QueryMomentCreateTimes(_DefaultMomentCreateTimes.OpGetAndUpdate, req.GetBaseRequest().Mid).
@ -556,6 +559,9 @@ func (s *Service) ApiUpdateMomentBusinessValidate(ctx *gin.Context, req *momentp
ec = errcode.ErrCodeMomentSrvOk
resultList := businessvalidator.NewAuthBusinessValidator(ctx, req).
QueryAccount(_DefaultAccount.OpListByMid).
EnsureAccountExist().
EnsureIsThisRole(consts.Streamer).
EnsureMediaIsSuccessfullyUploaded(req.Moment.MediaComp).
Validate().
Collect()