diff --git a/src/helpers/account_helper.rs b/src/helpers/account_helper.rs index 280aa2e..1fe4031 100644 --- a/src/helpers/account_helper.rs +++ b/src/helpers/account_helper.rs @@ -11,6 +11,7 @@ use crate::data::user::{AccountImageVisibility, UserID, UserPageStatus}; use crate::data::user_token::UserAccessToken; use crate::helpers::{comments_helper, conversations_helper, database, friends_helper, groups_helper, likes_helper, movies_helper, notifications_helper, posts_helper, survey_helper, user_helper}; use crate::helpers::database::{DeleteQuery, InsertQuery, QueryInfo}; +use crate::helpers::likes_helper::LikeType; use crate::utils::crypt_utils::{crypt_pass, rand_str}; use crate::utils::date_utils::{mysql_date, time}; use crate::utils::user_data_utils::user_data_path; @@ -336,6 +337,9 @@ pub fn delete(user_id: &UserID) -> ResultBoxError { // Delete user account image delete_account_image(user_id)?; + // Delete all the likes on the user page + likes_helper::delete_all(user_id.id(), LikeType::USER)?; + // TODO : continue work here Ok(())