format-sse-fix2
This commit is contained in:
parent
85502a694d
commit
7dd060bfdd
|
@ -25,7 +25,7 @@ struct RedisMessageData {
|
|||
action: String
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone, Debug)]
|
||||
#[derive(Serialize, Deserialize, Clone, Debug, Display)]
|
||||
pub struct SSEMessageData {
|
||||
payload: HashMap<String, Value>,
|
||||
action: String,
|
||||
|
@ -146,7 +146,7 @@ async fn connect_handler(
|
|||
let formatted_server_event = format!(
|
||||
"id: {}\ndata: {}\n\n",
|
||||
event_id,
|
||||
message_data
|
||||
server_event
|
||||
);
|
||||
|
||||
Some((Ok::<_, actix_web::Error>(Bytes::from(formatted_server_event)), rx))
|
||||
|
|
Loading…
Reference in New Issue
Block a user