mirror of
https://github.com/shiroyashik/sculptor.git
synced 2025-12-06 13:01:12 +03:00
Added avatar deletion and uploading ( v1 api )
This commit is contained in:
parent
64d1111522
commit
e8bf52dfd1
6 changed files with 65 additions and 29 deletions
|
|
@ -155,7 +155,7 @@ pub async fn delete_avatar(Token(token): Token, State(state): State<AppState>) -
|
|||
Ok("ok".to_string())
|
||||
}
|
||||
|
||||
fn send_event(broadcasts: &Arc<DashMap<Uuid, Sender<Vec<u8>>>>, uuid: &Uuid) {
|
||||
pub fn send_event(broadcasts: &Arc<DashMap<Uuid, Sender<Vec<u8>>>>, uuid: &Uuid) {
|
||||
if let Some(broadcast) = broadcasts.get(&uuid) {
|
||||
if broadcast.send(S2CMessage::Event(*uuid).to_vec()).is_err() {
|
||||
debug!("[WebSocket] Failed to send Event! There is no one to send. UUID: {uuid}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue