mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-06-21 00:45:18 +00:00
Close user web sockets when signing him out of clients
This commit is contained in:
@ -107,6 +107,8 @@ pub fn exists_mail(mail: &str) -> ResultBoxError<bool> {
|
||||
|
||||
/// Destroy a given user login tokens
|
||||
pub fn destroy_login_tokens(id: &UserID, client: &APIClient) -> ResultBoxError<()> {
|
||||
user_ws_controller::disconnect_user_from_client(id, client)?;
|
||||
|
||||
database::delete(DeleteQuery::new(USER_ACCESS_TOKENS_TABLE)
|
||||
.cond_u32("service_id", client.id)
|
||||
.cond_user_id("user_id", id)
|
||||
|
Reference in New Issue
Block a user