Skip to content

Commit

Permalink
fix(folder): mark root folders as deleted on user deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
sg-gs committed Jan 23, 2024
1 parent 9229f49 commit d5deb1e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/app/services/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,13 @@ module.exports = (Model, App) => {

await user.destroy();

await Model.folder.update({ deleted: true, removed: true }, {
where: {
user_id: user.id,
parent_id: null,
}
});

logger.info('User %s confirmed deactivation', userEmail);
} catch (err) {
if (user) {
Expand Down

0 comments on commit d5deb1e

Please sign in to comment.