diff --git a/shared/src/server_fns/auth.rs b/shared/src/server_fns/auth.rs index be4e176..a7d7e07 100644 --- a/shared/src/server_fns/auth.rs +++ b/shared/src/server_fns/auth.rs @@ -20,7 +20,7 @@ pub struct SetupStatus { pub completed: bool, } -#[server(GetSetupStatus, "/api/server_fns/GetSetupStatus", encoding = MsgPack)] +#[server(GetSetupStatus, "/api/server_fns/GetSetupStatus", input = MsgPack, output = MsgPack)] pub async fn get_setup_status() -> Result { use crate::DbContext; @@ -33,7 +33,7 @@ pub async fn get_setup_status() -> Result { }) } -#[server(Setup, "/api/server_fns/Setup", encoding = MsgPack)] +#[server(Setup, "/api/server_fns/Setup", input = MsgPack, output = MsgPack)] pub async fn setup(username: String, password: String) -> Result<(), ServerFnError> { use crate::DbContext; @@ -55,7 +55,7 @@ pub async fn setup(username: String, password: String) -> Result<(), ServerFnErr Ok(()) } -#[server(Login, "/api/server_fns/Login", encoding = MsgPack)] +#[server(Login, "/api/server_fns/Login", input = MsgPack, output = MsgPack)] pub async fn login(username: String, password: String) -> Result { use crate::DbContext; use leptos_axum::ResponseOptions; @@ -111,7 +111,7 @@ pub async fn login(username: String, password: String) -> Result Result<(), ServerFnError> { use leptos_axum::ResponseOptions; use cookie::{Cookie, SameSite}; @@ -132,7 +132,7 @@ pub async fn logout() -> Result<(), ServerFnError> { Ok(()) } -#[server(GetUser, "/api/server_fns/GetUser", encoding = MsgPack)] +#[server(GetUser, "/api/server_fns/GetUser", input = MsgPack, output = MsgPack)] pub async fn get_user() -> Result, ServerFnError> { use axum::http::HeaderMap; use leptos_axum::extract;