This commit is contained in:
Bryan Stitt 2023-06-25 21:26:28 -07:00
parent 5b60a43466
commit 8815b5c8cd
3 changed files with 3 additions and 5 deletions

View File

@ -29,7 +29,7 @@ use ulid::Ulid;
pub async fn query_user_stats<'a>(
app: &'a Web3ProxyApp,
bearer: Option<TypedHeader<Authorization<Bearer>>>,
mut params: &'a HashMap<String, String>,
params: &'a HashMap<String, String>,
stat_response_type: StatType,
) -> Web3ProxyResponse {
let (caller_user_id, _semaphore) = match bearer {
@ -51,7 +51,7 @@ pub async fn query_user_stats<'a>(
let user_id: u64 = params
.get("user_id")
.and_then(|x| x.parse::<u64>().ok())
.unwrap_or_else(|| caller_user_id);
.unwrap_or(caller_user_id);
let db_replica = app.db_replica()?;

View File

@ -31,7 +31,7 @@ use std::num::NonZeroU64;
use std::str::FromStr;
use std::sync::atomic::{self, Ordering};
use std::sync::Arc;
use tracing::{trace, warn};
use tracing::trace;
pub use stat_buffer::{SpawnedStatBuffer, StatBuffer};

View File

@ -8,8 +8,6 @@ use hashbrown::HashMap;
use influxdb2::api::write::TimestampPrecision;
use migration::sea_orm::prelude::Decimal;
use migration::sea_orm::DatabaseConnection;
use parking_lot::RwLock;
use std::sync::Arc;
use std::time::Duration;
use tokio::sync::broadcast;
use tokio::time::interval;