Merge pull request #21989 from overleaf/em-dangling-comments-script

Script for deleting dangling comments in a project

GitOrigin-RevId: da947834d5a824bbf38ec8e98e212796faf66568
This commit is contained in:
Eric Mc Sween
2024-11-21 09:04:19 +00:00
committed by Copybot
parent 67ca6a74b2
commit 7e42b1f3eb
3 changed files with 94 additions and 0 deletions
@@ -40,6 +40,9 @@ function deleteDoc(projectId, docId, name, deletedAt, callback) {
})
}
/**
* @param {string} projectId
*/
function getAllDocs(projectId, callback) {
const url = `${settings.apis.docstore.url}/project/${projectId}/doc`
request.get(
@@ -10,6 +10,9 @@ const { promisifyMultiResult } = require('@overleaf/promise-utils')
const ProjectGetter = require('../Project/ProjectGetter')
const FileStoreHandler = require('../FileStore/FileStoreHandler')
/**
* @param {string} projectId
*/
function flushProjectToMongo(projectId, callback) {
_makeRequest(
{
@@ -29,6 +32,9 @@ function flushMultipleProjectsToMongo(projectIds, callback) {
async.series(jobs, callback)
}
/**
* @param {string} projectId
*/
function flushProjectToMongoAndDelete(projectId, callback) {
_makeRequest(
{