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, 11 insertions, 0 deletions
diff --git a/src/app.rs b/src/app.rs
index 2bfabbe..e24331b 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -10,6 +10,7 @@ use crate::{
invite::app::Invites,
login::app::Logins,
message::app::Messages,
+ push::app::Push,
setup::app::Setup,
token::{self, app::Tokens},
vapid::app::Vapid,
@@ -59,6 +60,10 @@ impl App {
Messages::new(self.db.clone(), self.events.clone())
}
+ pub fn push(&self) -> Push {
+ Push::new(self.db.clone())
+ }
+
pub fn setup(&self) -> Setup {
Setup::new(self.db.clone(), self.events.clone())
}
@@ -107,6 +112,12 @@ impl FromRef<App> for Messages {
}
}
+impl FromRef<App> for Push {
+ fn from_ref(app: &App) -> Self {
+ app.push()
+ }
+}
+
impl FromRef<App> for Setup {
fn from_ref(app: &App) -> Self {
app.setup()