lint
This commit is contained in:
parent
70d5c09d3e
commit
c3a7d1646c
|
@ -15,9 +15,7 @@ use axum::{
|
||||||
Extension, Json, TypedHeader,
|
Extension, Json, TypedHeader,
|
||||||
};
|
};
|
||||||
use axum_macros::debug_handler;
|
use axum_macros::debug_handler;
|
||||||
use check_if_email_exists::{
|
use check_if_email_exists::{check_email, CheckEmailInput, Reachable};
|
||||||
check_email, CheckEmailInput, CheckEmailInputProxy, CheckEmailOutput, Reachable,
|
|
||||||
};
|
|
||||||
use entities;
|
use entities;
|
||||||
use entities::user;
|
use entities::user;
|
||||||
use migration::sea_orm::{self, ActiveModelTrait};
|
use migration::sea_orm::{self, ActiveModelTrait};
|
||||||
|
@ -66,17 +64,12 @@ pub async fn user_post(
|
||||||
let check_email_input = CheckEmailInput::new(x.clone());
|
let check_email_input = CheckEmailInput::new(x.clone());
|
||||||
// Verify this input, using async/await syntax.
|
// Verify this input, using async/await syntax.
|
||||||
let result = check_email(&check_email_input).await;
|
let result = check_email(&check_email_input).await;
|
||||||
match result.is_reachable {
|
|
||||||
Reachable::Invalid => {
|
// Let's be very chill about the validity of e-mails, and only error if the Syntax / SMPT / MX does not work
|
||||||
return Err(Web3ProxyError::BadRequest(
|
if let Reachable::Invalid = result.is_reachable {
|
||||||
"The e-mail address you provided seems invalid".into(),
|
return Err(Web3ProxyError::BadRequest(
|
||||||
));
|
"The e-mail address you provided seems invalid".into(),
|
||||||
}
|
));
|
||||||
// Let's be very chill about the validity of e-mails, and only error if the Syntax / SMPT / MX does not work
|
|
||||||
// Reachable::Safe => {}
|
|
||||||
// Reachable::Unknown => {}
|
|
||||||
// Reachable::Risky => {}
|
|
||||||
_ => {}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: do some basic validation
|
// TODO: do some basic validation
|
||||||
|
|
|
@ -12,9 +12,8 @@ use axum::{
|
||||||
use axum_client_ip::InsecureClientIp;
|
use axum_client_ip::InsecureClientIp;
|
||||||
use axum_macros::debug_handler;
|
use axum_macros::debug_handler;
|
||||||
use entities::{balance, increase_on_chain_balance_receipt, rpc_key, user};
|
use entities::{balance, increase_on_chain_balance_receipt, rpc_key, user};
|
||||||
use ethbloom::Input as BloomInput;
|
|
||||||
use ethers::abi::AbiEncode;
|
use ethers::abi::AbiEncode;
|
||||||
use ethers::types::{Address, TransactionReceipt, ValueOrArray, H256};
|
use ethers::types::{Address, TransactionReceipt, H256};
|
||||||
use hashbrown::HashMap;
|
use hashbrown::HashMap;
|
||||||
use http::StatusCode;
|
use http::StatusCode;
|
||||||
use log::{debug, info, trace};
|
use log::{debug, info, trace};
|
||||||
|
|
|
@ -19,7 +19,6 @@ use itertools::Itertools;
|
||||||
use migration::sea_orm::{
|
use migration::sea_orm::{
|
||||||
self, ActiveModelTrait, ColumnTrait, EntityTrait, IntoActiveModel, QueryFilter, TryIntoModel,
|
self, ActiveModelTrait, ColumnTrait, EntityTrait, IntoActiveModel, QueryFilter, TryIntoModel,
|
||||||
};
|
};
|
||||||
use migration::LockType;
|
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
|
@ -26,7 +26,6 @@ use migration::sea_orm::TransactionTrait;
|
||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use ulid::{self, Ulid};
|
use ulid::{self, Ulid};
|
||||||
use uuid::Uuid;
|
|
||||||
|
|
||||||
pub async fn get_keys_as_subuser(
|
pub async fn get_keys_as_subuser(
|
||||||
Extension(app): Extension<Arc<Web3ProxyApp>>,
|
Extension(app): Extension<Arc<Web3ProxyApp>>,
|
||||||
|
|
Loading…
Reference in New Issue