From eb96ab0a6c88e6040756cdf3911002f8ae0a323e Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Wed, 16 Nov 2022 21:21:27 +0000 Subject: [PATCH] actually save --- web3_proxy/src/bin/web3_proxy_cli/change_user_tier_by_key.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web3_proxy/src/bin/web3_proxy_cli/change_user_tier_by_key.rs b/web3_proxy/src/bin/web3_proxy_cli/change_user_tier_by_key.rs index eb5bba9e..5957e965 100644 --- a/web3_proxy/src/bin/web3_proxy_cli/change_user_tier_by_key.rs +++ b/web3_proxy/src/bin/web3_proxy_cli/change_user_tier_by_key.rs @@ -3,7 +3,8 @@ use argh::FromArgs; use entities::{rpc_key, user, user_tier}; use log::{debug, info}; use migration::sea_orm::{ - self, ColumnTrait, DatabaseConnection, EntityTrait, IntoActiveModel, QueryFilter, + self, ActiveModelTrait, ColumnTrait, DatabaseConnection, EntityTrait, IntoActiveModel, + QueryFilter, }; use uuid::Uuid; use web3_proxy::frontend::authorization::RpcSecretKey; @@ -52,6 +53,8 @@ impl ChangeUserTierByKeyCommand { user.user_tier_id = sea_orm::Set(user_tier.id); + user.save(db_conn).await?; + info!("user's tier changed"); }