|
@ -224,7 +224,7 @@ class ArchiveUserLocalJob extends SiteWorkerProcess { |
|
|
.find({ author: job.data.userId }) |
|
|
.find({ author: job.data.userId }) |
|
|
.cursor() |
|
|
.cursor() |
|
|
.eachAsync(async (comment) => { |
|
|
.eachAsync(async (comment) => { |
|
|
const commentFilename = path.join(job.data.imagePath, `comment-${comment._id}.json`); |
|
|
const commentFilename = path.join(job.data.commentPath, `comment-${comment._id}.json`); |
|
|
await fs.promises.writeFile(commentFilename, JSON.stringify(comment, null, 2)); |
|
|
await fs.promises.writeFile(commentFilename, JSON.stringify(comment, null, 2)); |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|