Revert get_user to not be server function

This commit is contained in:
Connor Wittman 2024-11-19 16:21:35 -05:00
parent 73b4b7674e
commit b25cb4549c

View File

@ -140,7 +140,7 @@ pub async fn require_auth() -> Result<(), ServerFnError> {
/// Ok(())
/// }
/// ```
#[server(endpoint = "get_user")]
#[cfg(feature = "ssr")]
pub async fn get_user() -> Result<User, ServerFnError> {
let auth_session = extract::<AuthSession<AuthBackend>>().await
.map_err(|e| ServerFnError::<NoCustomError>::ServerError(format!("Error getting auth session: {}", e)))?;