feat: complete modernization with shadcn, stateless auth, and performance optimizations
All checks were successful
Build MIPS Binary / build (push) Successful in 5m20s
All checks were successful
Build MIPS Binary / build (push) Successful in 5m20s
This commit is contained in:
@@ -8,6 +8,8 @@ use futures::stream::{self, Stream};
|
||||
use shared::{AppEvent, GlobalStats, Torrent, TorrentStatus};
|
||||
use std::convert::Infallible;
|
||||
use tokio_stream::StreamExt;
|
||||
use axum::response::IntoResponse;
|
||||
use base64::{Engine as _, engine::general_purpose::STANDARD as BASE64};
|
||||
|
||||
// Field definitions to keep query and parser in sync
|
||||
mod fields {
|
||||
@@ -192,22 +194,6 @@ pub async fn fetch_global_stats(client: &RtorrentClient) -> Result<GlobalStats,
|
||||
})
|
||||
}
|
||||
|
||||
use shared::xmlrpc::{
|
||||
parse_i64_response, parse_multicall_response, RpcParam, RtorrentClient, XmlRpcError,
|
||||
};
|
||||
use crate::AppState;
|
||||
use axum::extract::State;
|
||||
use axum::response::sse::{Event, Sse};
|
||||
use futures::stream::{self, Stream};
|
||||
use shared::{AppEvent, GlobalStats, Torrent, TorrentStatus};
|
||||
use std::convert::Infallible;
|
||||
use tokio_stream::StreamExt;
|
||||
use axum::response::IntoResponse;
|
||||
use base64::{Engine as _, engine::general_purpose::STANDARD as BASE64};
|
||||
|
||||
|
||||
// ... (fields and other helper functions remain the same)
|
||||
|
||||
pub async fn sse_handler(
|
||||
State(state): State<AppState>,
|
||||
) -> impl IntoResponse {
|
||||
@@ -267,4 +253,4 @@ pub async fn sse_handler(
|
||||
[("content-type", "application/x-msgpack")],
|
||||
sse
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user