From 35896efa04bb50e2342946e33367245b1cb4460e Mon Sep 17 00:00:00 2001 From: Brendan Golden Date: Tue, 11 Mar 2025 11:07:00 +0000 Subject: [PATCH] fix?: now properly sends teh reset emails --- src/methods/account_recover.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/methods/account_recover.rs b/src/methods/account_recover.rs index f68b7b3..03d2e5b 100644 --- a/src/methods/account_recover.rs +++ b/src/methods/account_recover.rs @@ -162,7 +162,7 @@ pub mod password { Some(x) => x, }; - if let Ok(res) = sqlx::query_as::<_, AccountsRecovery>( + match sqlx::query_as::<_, AccountsRecovery>( r#" SELECT * FROM accounts JOIN accounts_wolves ON accounts.id_wolves = accounts_wolves.id_wolves @@ -174,8 +174,13 @@ pub mod password { .fetch_all(pool) .await { - if !res.is_empty() { - return Some(res[0].to_owned()); + Ok(res) => { + if !res.is_empty() { + return Some(res[0].to_owned()); + } + } + Err(e) => { + dbg!(e); } }