diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2025-10-27 18:15:25 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2025-10-28 01:43:26 -0400 |
| commit | d66728889105f6f1ef5113d9ceb223e362df0008 (patch) | |
| tree | 5102813fbaa222276dcabd15a736838f9641d71f /src/ui | |
| parent | c2a3a010c67776b9a459d7ba0930630ff25a3a51 (diff) | |
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.
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/handlers/setup.rs | 7 |
1 files changed, 3 insertions, 4 deletions
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<App>) -> Result<Asset, Error> { - if app - .setup() +pub async fn handler(State(setup): State<Setup>) -> Result<Asset, Error> { + if setup .completed() .await .map_err(Internal::from) |
