diff --git a/migration/src/lib.rs b/migration/src/lib.rs index 1f313090..fe7e3ec6 100644 --- a/migration/src/lib.rs +++ b/migration/src/lib.rs @@ -12,8 +12,8 @@ mod m20221101_222349_archive_request; mod m20221108_200345_save_anon_stats; mod m20221211_124002_request_method_privacy; mod m20221213_134158_move_login_into_database; -mod m20230119_204135_better_free_tier; mod m20230117_191358_admin_table; +mod m20230119_204135_better_free_tier; mod m20230130_124740_read_only_login_logic; mod m20230130_165144_prepare_admin_imitation_pre_login; mod m20230215_152254_admin_trail; diff --git a/web3_proxy/src/bin/web3_proxy_cli/main.rs b/web3_proxy/src/bin/web3_proxy_cli/main.rs index def7dbf1..4f17aecc 100644 --- a/web3_proxy/src/bin/web3_proxy_cli/main.rs +++ b/web3_proxy/src/bin/web3_proxy_cli/main.rs @@ -306,6 +306,15 @@ fn main() -> anyhow::Result<()> { x.main(&db_conn).await } + SubCommand::ChangeUserAdminStatus(x) => { + let db_url = cli_config + .db_url + .expect("'--config' (with a db) or '--db-url' is required to run change_user_admin_status"); + + let db_conn = get_db(db_url, 1, 1).await?; + + x.main(&db_conn).await + } SubCommand::ChangeUserTierByAddress(x) => { let db_url = cli_config .db_url diff --git a/web3_proxy/src/frontend/users.rs b/web3_proxy/src/frontend/users.rs index 4682c4e0..9fada899 100644 --- a/web3_proxy/src/frontend/users.rs +++ b/web3_proxy/src/frontend/users.rs @@ -21,7 +21,7 @@ use axum_client_ip::InsecureClientIp; use axum_macros::debug_handler; use chrono::{TimeZone, Utc}; use entities::sea_orm_active_enums::{LogLevel, Role}; -use entities::{login, pending_login, referral, revert_log, rpc_key, secondary_user, user, user_tier}; +use entities::{login, pending_login, revert_log, rpc_key, secondary_user, user, user_tier}; use ethers::{prelude::Address, types::Bytes}; use hashbrown::HashMap; use http::{HeaderValue, StatusCode};