async fn verify_user_credentials(
db: &DB,
username_or_email: &str,
password: &str,
) -> Result<User, (StatusCode, String)>Expand description
Verifies user credentials (username/email and password) against the database
db- A reference to the database connectionusername_or_email- The username or email provided by the userpassword- The password provided by the user
ยงReturns
Ok(User)- The User struct if the credentials are validErr((StatusCode, String))- A tuple containing the HTTP status code and an error message if the credentials are invalid