diff --git a/DysonNetwork.Drive/Storage/FilePool.cs b/DysonNetwork.Drive/Storage/FilePool.cs index caab4b4..6dc4d28 100644 --- a/DysonNetwork.Drive/Storage/FilePool.cs +++ b/DysonNetwork.Drive/Storage/FilePool.cs @@ -11,8 +11,8 @@ public class RemoteStorageConfig public string Region { get; set; } = string.Empty; public string Bucket { get; set; } = string.Empty; public string Endpoint { get; set; } = string.Empty; - [JsonIgnore] public string SecretId { get; set; } = string.Empty; - [JsonIgnore] public string SecretKey { get; set; } = string.Empty; + public string SecretId { get; set; } = string.Empty; + public string SecretKey { get; set; } = string.Empty; public bool EnableSigned { get; set; } public bool EnableSsl { get; set; } public string? ImageProxy { get; set; } diff --git a/DysonNetwork.Drive/Storage/FilePoolController.cs b/DysonNetwork.Drive/Storage/FilePoolController.cs index 5fed999..7d3219a 100644 --- a/DysonNetwork.Drive/Storage/FilePoolController.cs +++ b/DysonNetwork.Drive/Storage/FilePoolController.cs @@ -19,6 +19,12 @@ public class FilePoolController(AppDatabase db) : ControllerBase var pools = await db.Pools .Where(p => p.PolicyConfig.PublicUsable || p.AccountId == accountId) .ToListAsync(); + pools = pools.Select(p => + { + p.StorageConfig.SecretId = string.Empty; + p.StorageConfig.SecretKey = string.Empty; + return p; + }).ToList(); return Ok(pools); }