From e08c3fa46aa48ac5cbeb75f52fc27d4061e2fa62 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Wed, 5 Nov 2025 17:17:59 -0500 Subject: Small refactoring to the Vapid key rotation middleware for consistency. This is the same "use a component directly rather than obtaining one from the `App`" change that was previously applied to most endpoints and middleware. I just forgot to do it here when making that change. --- src/vapid/middleware.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/vapid') diff --git a/src/vapid/middleware.rs b/src/vapid/middleware.rs index 02951ba..3129aa7 100644 --- a/src/vapid/middleware.rs +++ b/src/vapid/middleware.rs @@ -4,14 +4,14 @@ use axum::{ response::Response, }; -use crate::{app::App, clock::RequestedAt, error::Internal}; +use crate::{clock::RequestedAt, error::Internal, vapid::app::Vapid}; pub async fn middleware( - State(app): State, + State(vapid): State, RequestedAt(now): RequestedAt, request: Request, next: Next, ) -> Result { - app.vapid().refresh_key(&now).await?; + vapid.refresh_key(&now).await?; Ok(next.run(request).await) } -- cgit v1.2.3