diff options
Diffstat (limited to 'src/routes/search_results.rs')
-rw-r--r-- | src/routes/search_results.rs | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/routes/search_results.rs b/src/routes/search_results.rs index 03bd079..5c9efb8 100644 --- a/src/routes/search_results.rs +++ b/src/routes/search_results.rs @@ -31,20 +31,16 @@ pub async fn search_results( .search_results_by_name(&get_args.name.clone().unwrap()) .await } - _ => app_state - .database - .search_results() - .await - // Err(sqlx::Error::RowNotFound), - // Err(sqlx::Error::RowNotFound), - // Err(sqlx::Error::RowNotFound), + _ => app_state.database.search_results().await, // Err(sqlx::Error::RowNotFound), + // Err(sqlx::Error::RowNotFound), + // Err(sqlx::Error::RowNotFound), }; return HttpResponse::Ok().json(( - search_attempt.0.unwrap_or_else(|_| return Vec::new()), - search_attempt.1.unwrap_or_else(|_| return Vec::new()), - search_attempt.2.unwrap_or_else(|_| return Vec::new()) - )) + search_attempt.0.unwrap_or_else(|_| return Vec::new()), + search_attempt.1.unwrap_or_else(|_| return Vec::new()), + search_attempt.2.unwrap_or_else(|_| return Vec::new()), + )); } fn check_if_exists(value: &Option<String>) -> bool { |