summaryrefslogtreecommitdiff
path: root/src/app.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/app.rs')
-rw-r--r--src/app.rs18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/app.rs b/src/app.rs
index eff1b5e..4195fdc 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -1,8 +1,10 @@
use sqlx::sqlite::SqlitePool;
+use crate::{channel::app::Channels, index::app::Index, login::app::Logins};
+
#[derive(Clone)]
pub struct App {
- pub db: SqlitePool,
+ db: SqlitePool,
}
impl App {
@@ -10,3 +12,17 @@ impl App {
Self { db }
}
}
+
+impl App {
+ pub fn index(&self) -> Index {
+ Index::new(&self.db)
+ }
+
+ pub fn logins(&self) -> Logins {
+ Logins::new(&self.db)
+ }
+
+ pub fn channels(&self) -> Channels {
+ Channels::new(&self.db)
+ }
+}