Add new TODOs
This commit is contained in:
parent
9dd3811136
commit
cffa8f40c2
@ -44,3 +44,13 @@ pub async fn add_member(
|
||||
Ok(res)
|
||||
})
|
||||
}
|
||||
|
||||
/// Remove a membership to a family
|
||||
pub async fn remove_membership(family_id: FamilyID, user_id: UserID) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Remove all memberships of user
|
||||
pub async fn remove_all_user_membership(user_id: UserID) -> anyhow::Result<()> {
|
||||
todo!()
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ use crate::connections::db_connection;
|
||||
use crate::constants::{ACCOUNT_DELETE_TOKEN_DURATION, PASSWORD_RESET_TOKEN_DURATION};
|
||||
use crate::models::{NewUser, User, UserID};
|
||||
use crate::schema::users;
|
||||
use crate::services::{login_token_service, mail_service};
|
||||
use crate::services::{families_service, login_token_service, mail_service};
|
||||
use crate::utils::string_utils::rand_str;
|
||||
use crate::utils::time_utils::time;
|
||||
use bcrypt::DEFAULT_COST;
|
||||
@ -171,7 +171,8 @@ pub async fn delete_not_validated_accounts() -> anyhow::Result<()> {
|
||||
pub async fn delete_account(user: &User) -> anyhow::Result<()> {
|
||||
log::info!("Delete account #{:?}", user.id());
|
||||
|
||||
// TODO : remove families memberships
|
||||
// Remove families memberships
|
||||
families_service::remove_all_user_membership(user.id()).await?;
|
||||
|
||||
login_token_service::disconnect_user_from_all_devices(user.id()).await?;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user