use pretty address in logs
This commit is contained in:
parent
7b9bcf6881
commit
4203c61a59
@ -25,11 +25,12 @@ impl ChangeAdminStatusSubCommand {
|
|||||||
let address: Address = self.address.parse()?;
|
let address: Address = self.address.parse()?;
|
||||||
let should_be_admin: bool = self.should_be_admin;
|
let should_be_admin: bool = self.should_be_admin;
|
||||||
|
|
||||||
let address: Vec<u8> = address.to_fixed_bytes().into();
|
// we keep "address" around for use in logs
|
||||||
|
let address_vec: Vec<u8> = address.to_fixed_bytes().into();
|
||||||
|
|
||||||
// Find user in database
|
// Find user in database
|
||||||
let user = user::Entity::find()
|
let user = user::Entity::find()
|
||||||
.filter(user::Column::Address.eq(address.clone()))
|
.filter(user::Column::Address.eq(address_vec))
|
||||||
.one(db_conn)
|
.one(db_conn)
|
||||||
.await?
|
.await?
|
||||||
.context(format!("No user with this id found {:?}", address))?;
|
.context(format!("No user with this id found {:?}", address))?;
|
||||||
|
Loading…
Reference in New Issue
Block a user