diff --git a/src/api_setup.rs b/src/api_setup.rs index bddc730..699aa02 100644 --- a/src/api_setup.rs +++ b/src/api_setup.rs @@ -3,7 +3,7 @@ use riven::{RiotApi, RiotApiConfig}; use std::error::Error; -use crate::cache::LoggingMiddleware; +use crate::cache::RedisMiddleware; pub(crate) fn fetch_api() -> Result> { dotenvy::dotenv()?; @@ -20,7 +20,7 @@ pub(crate) fn fetch_api() -> Result> { .default_headers(default_headers) .build()?, ) - .with(LoggingMiddleware); + .with(RedisMiddleware); let config = RiotApiConfig::with_client_builder(c_builder); Ok(RiotApi::new(config)) diff --git a/src/cache.rs b/src/cache.rs index 11d919a..7eca954 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -2,10 +2,10 @@ use reqwest::{Request, Response}; use reqwest_middleware::{Middleware, Next, Result}; use task_local_extensions::Extensions; -pub(crate) struct LoggingMiddleware; +pub(crate) struct RedisMiddleware; #[async_trait::async_trait] -impl Middleware for LoggingMiddleware { +impl Middleware for RedisMiddleware { async fn handle( &self, req: Request,