Code refactored + new API

Added ability to send messages to a websocket session via HTTP API
This commit is contained in:
Shiroyasha 2024-06-17 23:05:25 +03:00
parent ca6990c5b1
commit 81ab2ba724
Signed by: shiroyashik
GPG key ID: E4953D3940D7860A
11 changed files with 172 additions and 74 deletions

View file

@ -136,7 +136,7 @@ pub async fn equip_avatar(Token(token): Token, State(state): State<AppState>) ->
.send(S2CMessage::Event(uuid).to_vec())
.is_err()
{
warn!("[WebSocket] Failed to send Event! Maybe there is no one to send")
debug!("[WebSocket] Failed to send Event! Maybe there is no one to send")
// TODO: Put into Handler
};
"ok".to_string()