by Robin at 20240702
This commit is contained in:
parent
8d170ef8ef
commit
c9e50ef864
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue