diff --git a/web3_proxy/src/bin/web3_proxy_cli/create_user.rs b/web3_proxy/src/bin/web3_proxy_cli/create_user.rs index 848cc687..bb8b60cd 100644 --- a/web3_proxy/src/bin/web3_proxy_cli/create_user.rs +++ b/web3_proxy/src/bin/web3_proxy_cli/create_user.rs @@ -7,7 +7,7 @@ use sea_orm::ActiveModelTrait; use web3_proxy::users::new_api_key; #[derive(FromArgs, PartialEq, Debug)] -/// First subcommand. +/// Create a new user and api key #[argh(subcommand, name = "create_user")] pub struct CreateUserSubCommand { #[argh(option)] diff --git a/web3_proxy/src/frontend/mod.rs b/web3_proxy/src/frontend/mod.rs index 6847e85f..495514ef 100644 --- a/web3_proxy/src/frontend/mod.rs +++ b/web3_proxy/src/frontend/mod.rs @@ -41,6 +41,7 @@ pub async fn rate_limit_by_ip(app: &Web3ProxyApp, ip: &IpAddr) -> Result<(), imp return Err(handle_anyhow_error( Some(StatusCode::TOO_MANY_REQUESTS), None, + // TODO: include the ip here anyhow::anyhow!("too many requests from this ip"), ) .await @@ -102,6 +103,7 @@ pub async fn rate_limit_by_key( return Err(handle_anyhow_error( Some(StatusCode::TOO_MANY_REQUESTS), None, + // TODO: include the user id (NOT THE API KEY!) here anyhow::anyhow!("too many requests from this key"), ) .await