websocket for single db update
This commit is contained in:
@@ -12,11 +12,11 @@ use crate::utils::{auth::AuthClaims, db_pool::{AppState, HotelPool}};
|
||||
|
||||
|
||||
/// Type alias: user_id → sender to that user
|
||||
type UserMap = DashMap<i32, mpsc::UnboundedSender<Message>>;
|
||||
pub type UserMap = DashMap<i32, mpsc::UnboundedSender<Message>>;
|
||||
/// hotel_id → users
|
||||
type HotelMap = DashMap<i32, Arc<UserMap>>;
|
||||
pub type HotelMap = DashMap<i32, Arc<UserMap>>;
|
||||
/// global map of all hotels
|
||||
type WsMap = Arc<HotelMap>;
|
||||
pub type WsMap = Arc<HotelMap>;
|
||||
/// Type alias: user_id → sender to that user
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user