fix: switch to built-in MsgPack codec and sync leptos versions
Some checks failed
Build MIPS Binary / build (push) Has been cancelled

This commit is contained in:
spinline
2026-02-11 18:42:50 +03:00
parent 0cdd92dc95
commit cba8c20d9b
4 changed files with 9 additions and 96 deletions

View File

@@ -1,6 +1,6 @@
use leptos::prelude::*;
use serde::{Deserialize, Serialize};
use crate::codec::MessagePack;
use crate::codec::MsgPack;
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct UserResponse {
@@ -20,7 +20,7 @@ pub struct SetupStatus {
pub completed: bool,
}
#[server(GetSetupStatus, "/api/server_fns/GetSetupStatus", encoding = "MessagePack")]
#[server(GetSetupStatus, "/api/server_fns/GetSetupStatus", encoding = "MsgPack")]
pub async fn get_setup_status() -> Result<SetupStatus, ServerFnError> {
use crate::DbContext;
@@ -33,7 +33,7 @@ pub async fn get_setup_status() -> Result<SetupStatus, ServerFnError> {
})
}
#[server(Setup, "/api/server_fns/Setup", encoding = "MessagePack")]
#[server(Setup, "/api/server_fns/Setup", encoding = "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 = "MessagePack")]
#[server(Login, "/api/server_fns/Login", encoding = "MsgPack")]
pub async fn login(username: String, password: String) -> Result<UserResponse, ServerFnError> {
use crate::DbContext;
use leptos_axum::ResponseOptions;
@@ -111,7 +111,7 @@ pub async fn login(username: String, password: String) -> Result<UserResponse, S
}
}
#[server(Logout, "/api/server_fns/Logout", encoding = "MessagePack")]
#[server(Logout, "/api/server_fns/Logout", encoding = "MsgPack")]
pub async fn logout() -> 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 = "MessagePack")]
#[server(GetUser, "/api/server_fns/GetUser", encoding = "MsgPack")]
pub async fn get_user() -> Result<Option<UserResponse>, ServerFnError> {
use axum::http::HeaderMap;
use leptos_axum::extract;