Skip to content

Commit 0df375b

Browse files
committed
feat: rename field in Response struct for consistency and add error handling in Pull implementation
1 parent cc061e6 commit 0df375b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/cloud/api.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ pub struct Response {
3838
pub private: bool,
3939
pub size: u64,
4040
pub db_name: String,
41-
42-
#[serde(rename = "createdAt")]
4341
pub created_at: String,
4442
}
4543

src/cloud/pull.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ impl Pull {
8888
None,
8989
None
9090
).download(&api_data.url).await;
91+
9192
match download {
9293
Ok(ref sql_content) => {
9394
Import::new(
@@ -101,6 +102,7 @@ impl Pull {
101102
Some(sql_content),
102103
).dump_directly().await?;
103104
}
105+
104106
Err(e) => {
105107
ErrorsAlerts::dump(&format!("Failed to download SQL data: {}", e));
106108
return Err(e);

0 commit comments

Comments
 (0)