Skip to content

Commit

Permalink
make list command async again
Browse files Browse the repository at this point in the history
  • Loading branch information
falk-werner committed Jan 27, 2024
1 parent 8ca929b commit 7ee0af8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ fn main() {
///
/// list all directories in the base directory that have a `README.md` file inside
#[tauri::command]
fn list(config: tauri::State<'_, Config>) -> Vec<String> {
async fn list(config: tauri::State<'_, Config>) -> std::result::Result<Vec<String>, String> {
let base_path = config.get_base_path().join(".notes");
match get_note_names(base_path) {
Ok(note_names) => return note_names,
Ok(note_names) => return Ok(note_names),
Err(e) => error_handling(e.to_string())
}

Vec::<String>::new()
Ok(Vec::<String>::new())
}

/// list all directories in `base_path` that have a `README.md` file inside
Expand Down

0 comments on commit 7ee0af8

Please sign in to comment.