removed one comment (not needed to remove redis)
This commit is contained in:
parent
d6a7b702f8
commit
5fd440523f
@ -71,22 +71,6 @@ impl ChangeUserAdminStatusSubCommand {
|
|||||||
.all(db_conn)
|
.all(db_conn)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
// // TODO: Remove from Redis
|
|
||||||
// // Remove multiple items simultaneously, but this should be quick let's not prematurely optimize
|
|
||||||
// let recent_user_id_key = format!("recent_users:id:{}", app.config.chain_id);
|
|
||||||
// let salt = app
|
|
||||||
// .config
|
|
||||||
// .public_recent_ips_salt
|
|
||||||
// .as_ref()
|
|
||||||
// .expect("public_recent_ips_salt must exist in here");
|
|
||||||
//
|
|
||||||
// // TODO: Also clear redis ...
|
|
||||||
// let salted_user_id = format!("{}:{}", salt, bearer_token.user_id);
|
|
||||||
// let hashed_user_id = Bytes::from(keccak256(salted_user_id.as_bytes()));
|
|
||||||
// redis_conn
|
|
||||||
// .zrem(&recent_user_id_key, hashed_user_id.to_string())
|
|
||||||
// .await?;
|
|
||||||
|
|
||||||
// Remove any user logins from the database (incl. bearer tokens)
|
// Remove any user logins from the database (incl. bearer tokens)
|
||||||
let delete_result = login::Entity::delete_many()
|
let delete_result = login::Entity::delete_many()
|
||||||
.filter(login::Column::UserId.eq(user.id))
|
.filter(login::Column::UserId.eq(user.id))
|
||||||
|
Loading…
Reference in New Issue
Block a user