summaryrefslogtreecommitdiff
path: root/src/app.rs
diff options
context:
space:
mode:
authorKit La Touche <kit@transneptune.net>2024-10-23 21:56:31 -0400
committerKit La Touche <kit@transneptune.net>2024-10-23 21:56:31 -0400
commit1f769855df2d9cf2bca883a0475670f227e3678b (patch)
tree6c94d9c868eb022588a07245df978478034ac5dd /src/app.rs
parent8f360dd9cc45bb14431238ccc5e3d137c020fa7b (diff)
parent461814e5174cef1be3e07b4e4069314e9bcbedd6 (diff)
Merge branch 'main' into wip/mobile
Diffstat (limited to 'src/app.rs')
-rw-r--r--src/app.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/app.rs b/src/app.rs
index cb05061..6d71259 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -5,14 +5,12 @@ use crate::{
channel::app::Channels,
event::{self, app::Events},
invite::app::Invites,
+ login::app::Logins,
message::app::Messages,
setup::app::Setup,
token::{self, app::Tokens},
};
-#[cfg(test)]
-use crate::login::app::Logins;
-
#[derive(Clone)]
pub struct App {
db: SqlitePool,
@@ -49,6 +47,11 @@ impl App {
Invites::new(&self.db)
}
+ #[cfg(not(test))]
+ pub const fn logins(&self) -> Logins {
+ Logins::new(&self.db)
+ }
+
#[cfg(test)]
pub const fn logins(&self) -> Logins {
Logins::new(&self.db, &self.events)