From f305e487d619f1d993d11d728c8cf7261bf3b371 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Mon, 27 Oct 2025 17:41:22 -0400 Subject: Convert `Invites` into a freestanding component. --- src/invite/handlers/get/mod.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/invite/handlers/get/mod.rs') diff --git a/src/invite/handlers/get/mod.rs b/src/invite/handlers/get/mod.rs index bb72586..d5fd9c2 100644 --- a/src/invite/handlers/get/mod.rs +++ b/src/invite/handlers/get/mod.rs @@ -4,19 +4,18 @@ use axum::{ }; use crate::{ - app::App, error::{Internal, NotFound}, - invite::{Id, Summary, handlers::PathInfo}, + invite::{Id, Summary, app::Invites, handlers::PathInfo}, }; #[cfg(test)] mod test; pub async fn handler( - State(app): State, + State(invites): State, Path(invite): Path, ) -> Result, Error> { - app.invites() + invites .get(&invite) .await? .map(Json) -- cgit v1.2.3