Revert get_user to not be server function
This commit is contained in:
parent
73b4b7674e
commit
b25cb4549c
@ -140,7 +140,7 @@ pub async fn require_auth() -> Result<(), ServerFnError> {
|
|||||||
/// Ok(())
|
/// Ok(())
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
#[server(endpoint = "get_user")]
|
#[cfg(feature = "ssr")]
|
||||||
pub async fn get_user() -> Result<User, ServerFnError> {
|
pub async fn get_user() -> Result<User, ServerFnError> {
|
||||||
let auth_session = extract::<AuthSession<AuthBackend>>().await
|
let auth_session = extract::<AuthSession<AuthBackend>>().await
|
||||||
.map_err(|e| ServerFnError::<NoCustomError>::ServerError(format!("Error getting auth session: {}", e)))?;
|
.map_err(|e| ServerFnError::<NoCustomError>::ServerError(format!("Error getting auth session: {}", e)))?;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user