parent
b331b9f6a3
commit
d11eb04d12
13 changed files with 163 additions and 973 deletions
|
|
@ -100,10 +100,10 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
serde_json::to_string_pretty(&*db).ok()
|
||||
};
|
||||
|
||||
if let Some(json) = json {
|
||||
if let Err(error) = tokio::fs::write("clients.json", json).await {
|
||||
eprintln!("Failed to persist clients.json: {error}");
|
||||
}
|
||||
if let Some(json) = json
|
||||
&& let Err(error) = tokio::fs::write("clients.json", json).await
|
||||
{
|
||||
eprintln!("Failed to persist clients.json: {error}");
|
||||
}
|
||||
|
||||
println!("Registered new client with ID: {id}");
|
||||
|
|
|
|||
Loading…
Reference in a new issue