summaryrefslogtreecommitdiff
path: root/src/app.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/app.rs')
-rw-r--r--src/app.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/app.rs b/src/app.rs
index e61672f..e33ee39 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -1,3 +1,4 @@
+use axum::extract::FromRef;
use sqlx::sqlite::SqlitePool;
#[cfg(test)]
@@ -33,8 +34,8 @@ impl App {
}
impl App {
- pub const fn boot(&self) -> Boot<'_> {
- Boot::new(&self.db)
+ pub fn boot(&self) -> Boot {
+ Boot::new(self.db.clone())
}
pub const fn conversations(&self) -> Conversations<'_> {
@@ -70,3 +71,9 @@ impl App {
Users::new(&self.db, &self.events)
}
}
+
+impl FromRef<App> for Boot {
+ fn from_ref(app: &App) -> Self {
+ app.boot()
+ }
+}