fix error when no backup
This commit is contained in:
parent
16756aba94
commit
9bace8d8c5
@ -188,7 +188,14 @@ fn backup_info(
|
||||
};
|
||||
serde_json::to_string(&wbh)?
|
||||
}
|
||||
Err(_) => "{\"error\":\"Header could not be parsed\"".to_owned(),
|
||||
Err(_) => {
|
||||
//TODO make better
|
||||
let wbh = WebBackupHeader {
|
||||
timestamp: "no backup".to_owned(),
|
||||
size: 0,
|
||||
};
|
||||
serde_json::to_string(&wbh)?
|
||||
}
|
||||
};
|
||||
anyhow::Ok(Some(json))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user