summaryrefslogtreecommitdiff
path: root/src/invite/app.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/invite/app.rs')
-rw-r--r--src/invite/app.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/invite/app.rs b/src/invite/app.rs
index 6684d03..6f58d0a 100644
--- a/src/invite/app.rs
+++ b/src/invite/app.rs
@@ -17,13 +17,13 @@ use crate::{
},
};
-pub struct Invites<'a> {
- db: &'a SqlitePool,
- events: &'a Broadcaster,
+pub struct Invites {
+ db: SqlitePool,
+ events: Broadcaster,
}
-impl<'a> Invites<'a> {
- pub const fn new(db: &'a SqlitePool, events: &'a Broadcaster) -> Self {
+impl Invites {
+ pub const fn new(db: SqlitePool, events: Broadcaster) -> Self {
Self { db, events }
}
@@ -88,7 +88,7 @@ impl<'a> Invites<'a> {
tx.tokens().create(&token, &secret).await?;
tx.commit().await?;
- stored.publish(self.events);
+ stored.publish(&self.events);
Ok(secret)
}