Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3338614
D11734.id39541.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D11734.id39541.diff
View Options
diff --git a/native/native_rust_library/src/backup.rs b/native/native_rust_library/src/backup.rs
--- a/native/native_rust_library/src/backup.rs
+++ b/native/native_rust_library/src/backup.rs
@@ -241,7 +241,7 @@
.download_backup_data(&latest_backup_descriptor, RequestedData::BackupID)
.await?;
- let LatestBackupIDResponse { backup_id } =
+ let LatestBackupIDResponse { backup_id, .. } =
serde_json::from_slice(&backup_id_response)?;
let mut backup_key = compute_backup_key_str(&backup_secret, &backup_id)?;
diff --git a/services/backup/src/database/backup_item.rs b/services/backup/src/database/backup_item.rs
--- a/services/backup/src/database/backup_item.rs
+++ b/services/backup/src/database/backup_item.rs
@@ -182,6 +182,7 @@
pub created: DateTime<Utc>,
pub backup_id: String,
pub user_keys: BlobInfo,
+ pub siwe_backup_msg: Option<String>,
}
impl TryFrom<HashMap<String, AttributeValue>> for OrderedBackupItem {
@@ -208,11 +209,15 @@
value.remove(backup_table::attr::USER_KEYS),
)?;
+ let siwe_backup_msg: Option<String> =
+ value.take_attr(backup_table::attr::SIWE_BACKUP_MSG)?;
+
Ok(OrderedBackupItem {
user_id,
created,
backup_id,
user_keys,
+ siwe_backup_msg,
})
}
}
diff --git a/services/backup/src/http/handlers/backup.rs b/services/backup/src/http/handlers/backup.rs
--- a/services/backup/src/http/handlers/backup.rs
+++ b/services/backup/src/http/handlers/backup.rs
@@ -291,6 +291,7 @@
let response = LatestBackupIDResponse {
backup_id: backup_item.backup_id,
+ siwe_backup_msg: backup_item.siwe_backup_msg,
};
Ok(web::Json(response))
diff --git a/shared/comm-lib/src/backup/mod.rs b/shared/comm-lib/src/backup/mod.rs
--- a/shared/comm-lib/src/backup/mod.rs
+++ b/shared/comm-lib/src/backup/mod.rs
@@ -2,9 +2,12 @@
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
pub struct LatestBackupIDResponse {
#[serde(rename = "backupID")]
pub backup_id: String,
+
+ pub siwe_backup_msg: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 22, 6:25 PM (17 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2563795
Default Alt Text
D11734.id39541.diff (2 KB)
Attached To
Mode
D11734: Introduce 'msgBackup' field to 'OrderedBackupItem' and 'LatestBackupIDResponse'
Attached
Detach File
Event Timeline
Log In to Comment