|
@@ -330,6 +330,12 @@ async fn run(){
|
|
// parse args from CLI
|
|
// parse args from CLI
|
|
parse_args();
|
|
parse_args();
|
|
|
|
|
|
|
|
+ // API
|
|
|
|
+ tokio::spawn(async move {
|
|
|
|
+ run_api().await
|
|
|
|
+ });
|
|
|
|
+ // run_api().await;
|
|
|
|
+
|
|
// downloading new emails
|
|
// downloading new emails
|
|
let new_paths = imap::download_email_from_imap().await.expect("Cannot download new emails");
|
|
let new_paths = imap::download_email_from_imap().await.expect("Cannot download new emails");
|
|
|
|
|
|
@@ -373,9 +379,6 @@ async fn run(){
|
|
if let Err(e) = check_for_updates("INBOX".to_string()).await {
|
|
if let Err(e) = check_for_updates("INBOX".to_string()).await {
|
|
eprintln!("Failed to monitor mailbox: {:?}", e);
|
|
eprintln!("Failed to monitor mailbox: {:?}", e);
|
|
}
|
|
}
|
|
-
|
|
|
|
- // API
|
|
|
|
- run_api().await;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
/// Entry point for a wasi env
|
|
/// Entry point for a wasi env
|