diff options
author | niliara-edu <nil.jimeno@estudiant.fjaverianas.com> | 2025-01-25 20:50:21 +0100 |
---|---|---|
committer | niliara-edu <nil.jimeno@estudiant.fjaverianas.com> | 2025-01-25 20:50:21 +0100 |
commit | 57a2df34f4986f1f6062f22804021925afec0419 (patch) | |
tree | f72ba12f40d15248d25235ce711b0aec2a6137a9 /src/api/search_results.rs | |
parent | 8782579e326b55e182d5767a451b8864b3453cce (diff) |
refactor database
Diffstat (limited to 'src/api/search_results.rs')
-rw-r--r-- | src/api/search_results.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/api/search_results.rs b/src/api/search_results.rs index 585ba2c..8f01e56 100644 --- a/src/api/search_results.rs +++ b/src/api/search_results.rs @@ -1,4 +1,6 @@ -use crate::database::{Album, Artist, Song}; +use crate::database::album::Album; +use crate::database::artist::Artist; +use crate::database::song::Song; use crate::AppState; use actix_web::{get, web, HttpResponse}; use serde::Deserialize; @@ -42,9 +44,11 @@ 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), + _ => ( + Err(sqlx::Error::RowNotFound), + Err(sqlx::Error::RowNotFound), + Err(sqlx::Error::RowNotFound) + ), }; return HttpResponse::Ok().json(( |