1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2024-11-29 16:56:28 +00:00

Close user websockets when he destroy all its access tokens

This commit is contained in:
Pierre HUBERT 2021-02-05 13:32:07 +01:00
parent 5f3eab7c07
commit 959a9d8a5e

View File

@ -117,6 +117,8 @@ pub fn destroy_login_tokens(id: &UserID, client: &APIClient) -> ResultBoxError<(
/// Destroy all login tokens of a user /// Destroy all login tokens of a user
pub fn destroy_all_user_tokens(id: &UserID) -> ResultBoxError { 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) database::DeleteQuery::new(USER_ACCESS_TOKENS_TABLE)
.cond_user_id("user_id", id) .cond_user_id("user_id", id)
.exec() .exec()