diff options
Diffstat (limited to 'src/app.rs')
| -rw-r--r-- | src/app.rs | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -1,13 +1,16 @@ use sqlx::sqlite::SqlitePool; use crate::{ + boot::app::Boot, channel::app::Channels, event::{app::Events, broadcaster::Broadcaster as EventBroadcaster}, - login::app::Logins, message::app::Messages, token::{app::Tokens, broadcaster::Broadcaster as TokenBroadcaster}, }; +#[cfg(test)] +use crate::login::app::Logins; + #[derive(Clone)] pub struct App { db: SqlitePool, @@ -24,6 +27,10 @@ impl App { } impl App { + pub const fn boot(&self) -> Boot { + Boot::new(&self.db) + } + pub const fn channels(&self) -> Channels { Channels::new(&self.db, &self.events) } @@ -32,6 +39,7 @@ impl App { Events::new(&self.db, &self.events) } + #[cfg(test)] pub const fn logins(&self) -> Logins { Logins::new(&self.db) } |
