Remote compact for API-key users (#7835)

This commit is contained in:
pakrym-oai
2025-12-12 10:05:02 -08:00
committed by GitHub
parent 9429e8b219
commit b3ddd50eee
11 changed files with 101 additions and 78 deletions

View File

@@ -150,8 +150,8 @@ pub enum ResponseItem {
GhostSnapshot {
ghost_commit: GhostCommit,
},
#[serde(alias = "compaction")]
CompactionSummary {
#[serde(alias = "compaction_summary")]
Compaction {
encrypted_content: String,
},
#[serde(other)]
@@ -671,13 +671,13 @@ mod tests {
#[test]
fn deserializes_compaction_alias() -> Result<()> {
let json = r#"{"type":"compaction","encrypted_content":"abc"}"#;
let json = r#"{"type":"compaction_summary","encrypted_content":"abc"}"#;
let item: ResponseItem = serde_json::from_str(json)?;
assert_eq!(
item,
ResponseItem::CompactionSummary {
ResponseItem::Compaction {
encrypted_content: "abc".into(),
}
);