Reattached document service.
This commit is contained in:
@ -80,8 +80,13 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
async fn mtt_conn(_sess_id: SessionID, _state: State<MoreThanText>) -> impl IntoResponse {
|
||||
("something".to_string(),)
|
||||
async fn mtt_conn(sess_id: SessionID, state: State<MoreThanText>) -> impl IntoResponse {
|
||||
let (tx, mut rx) = channel(1);
|
||||
spawn(async move {
|
||||
tx.send(state.get_document(sess_id.0)).await.unwrap();
|
||||
});
|
||||
let content = rx.recv().await.unwrap();
|
||||
content
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
Reference in New Issue
Block a user