feat(server): add routes for private sign-up links
This commit is contained in:
parent
69e84b4266
commit
722317603d
4 changed files with 76 additions and 9 deletions
|
|
@ -29,9 +29,4 @@ impl<'a> AdminRepository<'a> {
|
|||
|
||||
Ok(link)
|
||||
}
|
||||
|
||||
/// Remove the signup link with the given ID, if it exists
|
||||
pub fn remove_signup_link(&self, id: i64) -> Result<bool, AuthErr> {
|
||||
self.store.remove_signup_link(id)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ use chrono::{TimeDelta, Utc};
|
|||
use rand::rngs::OsRng;
|
||||
|
||||
use crate::{
|
||||
models,
|
||||
SignupLink, models,
|
||||
store::{AuthErr, GpodderStore},
|
||||
};
|
||||
|
||||
|
|
@ -117,4 +117,13 @@ impl GpodderRepository {
|
|||
|
||||
self.store.remove_old_sessions(min_last_seen)
|
||||
}
|
||||
|
||||
pub fn get_signup_link(&self, id: i64) -> Result<Option<SignupLink>, AuthErr> {
|
||||
self.store.get_signup_link(id)
|
||||
}
|
||||
|
||||
/// Remove the signup link with the given ID, if it exists
|
||||
pub fn remove_signup_link(&self, id: i64) -> Result<bool, AuthErr> {
|
||||
self.store.remove_signup_link(id)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue