修复提现拒绝审核参数校验
This commit is contained in:
@@ -13,6 +13,7 @@ var (
|
||||
ErrMinWithdrawalAmount = errors.New("amount below minimum withdrawal")
|
||||
ErrMaxWithdrawalAmount = errors.New("amount exceeds maximum withdrawal")
|
||||
ErrWithdrawalLocked = errors.New("withdrawal status locked")
|
||||
ErrInvalidReviewAction = errors.New("invalid review action")
|
||||
ErrUnauthorized = errors.New("unauthorized")
|
||||
)
|
||||
|
||||
@@ -99,6 +100,9 @@ func (s *Service) Review(ctx context.Context, adminID, id uint64, req ReviewWith
|
||||
if s.repo == nil {
|
||||
return nil, ErrDependencyUnavailable
|
||||
}
|
||||
if req.Approved == nil {
|
||||
return nil, ErrInvalidReviewAction
|
||||
}
|
||||
return s.repo.Review(ctx, adminID, id, req)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user