mirror of
				https://gitlab.com/comunic/comunicapiv3
				synced 2025-11-04 01:24:04 +00:00 
			
		
		
		
	Close user websockets when he destroy all its access tokens
This commit is contained in:
		@@ -117,6 +117,8 @@ pub fn destroy_login_tokens(id: &UserID, client: &APIClient) -> ResultBoxError<(
 | 
			
		||||
 | 
			
		||||
/// Destroy all login tokens of a user
 | 
			
		||||
pub fn destroy_all_user_tokens(id: &UserID) -> ResultBoxError {
 | 
			
		||||
    user_ws_controller::disconnect_user_from_all_sockets(id)?;
 | 
			
		||||
 | 
			
		||||
    database::DeleteQuery::new(USER_ACCESS_TOKENS_TABLE)
 | 
			
		||||
        .cond_user_id("user_id", id)
 | 
			
		||||
        .exec()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user