Browse Source

actually ban and remove archived users

develop
Rob Colbert 2 years ago
parent
commit
c30574324b
  1. 6
      app/workers/reeeper/job/archive-user-local.js

6
app/workers/reeeper/job/archive-user-local.js

@ -87,7 +87,7 @@ class ArchiveUserLocalJob extends SiteWorkerProcess {
/* /*
* Disable the User account (which destroys their session and cookie(s)) * Disable the User account (which destroys their session and cookie(s))
*/ */
// await this.disableUser(job); await this.disableUser(job);
/* /*
* Archive the User's content to the workPath on the local file system. * Archive the User's content to the workPath on the local file system.
@ -110,7 +110,7 @@ class ArchiveUserLocalJob extends SiteWorkerProcess {
username: job.data.user.username, username: job.data.user.username,
}, },
}); });
// await userService.ban(job.data.user); await userService.ban(job.data.user);
this.log.info('removing user', { this.log.info('removing user', {
user: { user: {
@ -118,7 +118,7 @@ class ArchiveUserLocalJob extends SiteWorkerProcess {
username: job.data.user.username, username: job.data.user.username,
}, },
}); });
// await User.deleteOne({ _id: job.data.userId }); await User.deleteOne({ _id: job.data.userId });
} catch (error) { } catch (error) {
this.log.error('failed to archive user', { userId: job.data.userId, error }); this.log.error('failed to archive user', { userId: job.data.userId, error });
throw error; throw error;

Loading…
Cancel
Save