mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-12-27 22:18:51 +00:00
Close user websockets when he destroy all its access tokens
This commit is contained in:
parent
5f3eab7c07
commit
959a9d8a5e
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user