增加发布协议确认配置
This commit is contained in:
@@ -22,6 +22,7 @@ var (
|
||||
ErrDepositTooLow = errors.New("listing deposit too low")
|
||||
ErrInvalidHafCoin = errors.New("invalid haf coin amount")
|
||||
ErrMissingScreenshot = errors.New("missing screenshot")
|
||||
ErrAgreementRequired = errors.New("listing publish agreement required")
|
||||
ErrMissingUploaderName = errors.New("missing uploader name")
|
||||
ErrMissingUploadData = errors.New("missing upload data")
|
||||
ErrUploaderNotFound = errors.New("uploader not found")
|
||||
@@ -80,6 +81,9 @@ func (s *Service) Create(ownerID uint64, req CreateRequest) (*ListingDTO, error)
|
||||
if s.repo == nil {
|
||||
return nil, ErrDependencyUnavailable
|
||||
}
|
||||
if !req.AgreedVirtualAssetSale || !req.AgreedSellerAgreement {
|
||||
return nil, ErrAgreementRequired
|
||||
}
|
||||
rules, err := s.publishRules()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user