Merge pull request #9383 from overleaf/em-file-tree-histories

Track source for all file tree operations

GitOrigin-RevId: ff95ea8e99bfa30203a2a42968519bbaba65e708
This commit is contained in:
Eric Mc Sween
2022-08-26 08:03:30 +00:00
committed by Copybot
parent 2432b265eb
commit 8b2f8ce243
24 changed files with 666 additions and 527 deletions
+2 -1
View File
@@ -21,7 +21,8 @@ async function main() {
await ProjectEntityUpdateHandler.promises.convertDocToFile(
projectId,
docId,
userId
userId,
null
)
} catch (err) {
if (err instanceof Errors.NotFoundError) {
+6 -3
View File
@@ -36,7 +36,8 @@ async function _createRootDoc(project, ownerId, docLines) {
project.rootFolder[0]._id,
'main.tex',
docLines,
ownerId
ownerId,
null
)
await ProjectEntityUpdateHandler.promises.setRootDoc(project._id, doc._id)
} catch (error) {
@@ -62,7 +63,8 @@ async function _addDefaultExampleProjectFiles(ownerId, projectName, project) {
project.rootFolder[0]._id,
'sample.bib',
bibDocLines,
ownerId
ownerId,
null
)
const frogPath = path.join(
@@ -75,7 +77,8 @@ async function _addDefaultExampleProjectFiles(ownerId, projectName, project) {
'frog.jpg',
frogPath,
null,
ownerId
ownerId,
null
)
}
@@ -304,7 +304,8 @@ async function convertLargeDocsToFile(projectId, userId) {
await ProjectEntityUpdateHandler.promises.convertDocToFile(
projectId,
doc._id,
userId
userId,
null
)
convertedDocCount++
}
@@ -123,7 +123,8 @@ async function processDoc(docId) {
restoredName,
doc.lines,
doc.ranges,
null
null,
'recovery-script'
)
await deleteDocFromRedis(projectId, docId)
} catch (err) {