mirror of
https://gitee.com/wanwujie/sub2api
synced 2026-05-05 13:40:44 +08:00
fix(ci): clean up lint and dead code
This commit is contained in:
@@ -131,21 +131,6 @@ func selectVisibleMethodInstanceByProviderKey(instances []*dbent.PaymentProvider
|
||||
return nil
|
||||
}
|
||||
|
||||
func buildPaymentProviderConflictError(method string, conflicting *dbent.PaymentProviderInstance) error {
|
||||
metadata := map[string]string{
|
||||
"payment_method": NormalizeVisibleMethod(method),
|
||||
}
|
||||
if conflicting != nil {
|
||||
metadata["conflicting_provider_id"] = fmt.Sprintf("%d", conflicting.ID)
|
||||
metadata["conflicting_provider_key"] = conflicting.ProviderKey
|
||||
metadata["conflicting_provider_name"] = conflicting.Name
|
||||
}
|
||||
return infraerrors.Conflict(
|
||||
"PAYMENT_PROVIDER_CONFLICT",
|
||||
fmt.Sprintf("%s payment already has an enabled provider instance", NormalizeVisibleMethod(method)),
|
||||
).WithMetadata(metadata)
|
||||
}
|
||||
|
||||
func (s *PaymentConfigService) validateVisibleMethodEnablementConflicts(
|
||||
ctx context.Context,
|
||||
excludeID int64,
|
||||
|
||||
Reference in New Issue
Block a user