mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-22 23:08:25 +00:00
fix(payment): return actual decrypted config values instead of masking
Admin API is authenticated; frontend handles visual masking via password inputs + eye toggle. This allows the eye icon to reveal actual values.
This commit is contained in:
@@ -1 +1 @@
|
||||
0.1.108.41
|
||||
0.1.108.42
|
||||
|
||||
@@ -295,19 +295,9 @@ func (s *PaymentConfigService) ListProviderInstancesWithConfig(ctx context.Conte
|
||||
}
|
||||
|
||||
func (s *PaymentConfigService) decryptAndMaskConfig(encrypted string) map[string]string {
|
||||
raw := s.decryptConfig(encrypted)
|
||||
if raw == nil {
|
||||
return nil
|
||||
}
|
||||
masked := make(map[string]string, len(raw))
|
||||
for k, v := range raw {
|
||||
if isSensitiveConfigField(k) && v != "" {
|
||||
masked[k] = "••••••••"
|
||||
} else {
|
||||
masked[k] = v
|
||||
}
|
||||
}
|
||||
return masked
|
||||
// Return actual decrypted values — admin API is authenticated,
|
||||
// frontend handles visual masking via password inputs + eye toggle.
|
||||
return s.decryptConfig(encrypted)
|
||||
}
|
||||
|
||||
// pendingOrderStatuses are order statuses considered "in progress" —
|
||||
|
||||
Reference in New Issue
Block a user