fix handler
This commit is contained in:
parent
627bf71703
commit
31c31801ce
1 changed files with 3 additions and 4 deletions
|
@ -10,7 +10,6 @@ use axum::{
|
|||
use julid::Julid;
|
||||
use native_dialog::MessageDialogBuilder;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use tokio::sync::Mutex;
|
||||
|
||||
use crate::{
|
||||
Client, JoecalState,
|
||||
|
@ -44,7 +43,7 @@ impl Client {
|
|||
}
|
||||
|
||||
let peer = self.peers.lock().await.get(&peer).unwrap().clone();
|
||||
println!("Peer: {:?}", peer);
|
||||
println!("Peer: {peer:?}");
|
||||
|
||||
let response = self
|
||||
.http_client
|
||||
|
@ -298,9 +297,9 @@ pub struct UploadParams {
|
|||
|
||||
pub async fn register_cancel(
|
||||
Query(params): Query<CancelParams>,
|
||||
Extension(sessions): Extension<Arc<Mutex<HashMap<String, Session>>>>,
|
||||
State(state): State<JoecalState>,
|
||||
) -> impl IntoResponse {
|
||||
let mut sessions_lock = sessions.lock().await;
|
||||
let mut sessions_lock = state.sessions.lock().await;
|
||||
let session = match sessions_lock.get_mut(¶ms.session_id) {
|
||||
Some(session) => session,
|
||||
None => return StatusCode::BAD_REQUEST.into_response(),
|
||||
|
|
Loading…
Reference in a new issue