todos
This commit is contained in:
parent
2524168a0e
commit
46107eaa95
@ -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)]
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user