From d66728889105f6f1ef5113d9ceb223e362df0008 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Mon, 27 Oct 2025 18:15:25 -0400 Subject: Convert the `Setup` component into a freestanding struct. The changes to the setup-requiring middleware are probably more general than was strictly needed, but they will make it work with anything that can provide a `Setup` component rather than being bolted to `App` specifically, which feels tidier. --- src/ui/handlers/setup.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/ui/handlers/setup.rs') diff --git a/src/ui/handlers/setup.rs b/src/ui/handlers/setup.rs index 49821cf..5707765 100644 --- a/src/ui/handlers/setup.rs +++ b/src/ui/handlers/setup.rs @@ -4,14 +4,13 @@ use axum::{ }; use crate::{ - app::App, error::Internal, + setup::app::Setup, ui::assets::{Asset, Assets}, }; -pub async fn handler(State(app): State) -> Result { - if app - .setup() +pub async fn handler(State(setup): State) -> Result { + if setup .completed() .await .map_err(Internal::from) -- cgit v1.2.3