diff options
Diffstat (limited to 'kittybox-rs/src/frontend/onboarding.rs')
-rw-r--r-- | kittybox-rs/src/frontend/onboarding.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kittybox-rs/src/frontend/onboarding.rs b/kittybox-rs/src/frontend/onboarding.rs index 08a05ee..e9eceb2 100644 --- a/kittybox-rs/src/frontend/onboarding.rs +++ b/kittybox-rs/src/frontend/onboarding.rs @@ -145,3 +145,10 @@ pub async fn post<D: Storage + 'static>( } } } + +pub fn router<S: Storage + 'static>(database: S, http: reqwest::Client) -> axum::routing::MethodRouter { + axum::routing::get(get) + .post(post::<S>) + .layer(axum::Extension(database)) + .layer(axum::Extension(http)) +} |