Detect user logged in and display "logged in" for profile

This commit is contained in:
2024-10-11 17:21:11 -04:00
parent ab50826d31
commit 3149f65a97
4 changed files with 52 additions and 6 deletions

View File

@ -117,7 +117,7 @@ pub async fn validate_user(credentials: UserCredentials) -> Result<Option<User>,
/// Get a user from the database by username or email
/// Returns a Result with the user if found, None if not found, or an error if there was a problem
#[server(endpoint = "get_user")]
#[server(endpoint = "find_user")]
pub async fn get_user(username_or_email: String) -> Result<Option<User>, ServerFnError> {
let mut user = find_user(username_or_email).await?;