🐛 Fix bugs

This commit is contained in:
2025-07-27 03:29:37 +08:00
parent 42b300fefb
commit 4c0d381be2
2 changed files with 8 additions and 2 deletions

View File

@@ -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; }

View File

@@ -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);
}