mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-08 08:39:03 +02:00
Revert "Revert "Revert "format fix"""
This reverts commit abb3f94c50b94cd87012d9e55c40afd9cbfe97e0. GitOrigin-RevId: 090e01b96222024341e3c988ec3ba4c9fa1eef11
This commit is contained in:
@@ -316,10 +316,7 @@ async function deleteEntity(projectId, entityId, entityType, callback) {
|
||||
projectId,
|
||||
{ name: true, rootFolder: true, overleaf: true, rootDoc_id: true }
|
||||
)
|
||||
const deleteRootDoc =
|
||||
project.rootDoc_id &&
|
||||
entityId &&
|
||||
project.rootDoc_id.toString() === entityId.toString()
|
||||
const deleteRootDoc = project.rootDoc_id && entityId && project.rootDoc_id.toString() === entityId.toString()
|
||||
const { element: entity, path } = await ProjectLocator.promises.findElement({
|
||||
project,
|
||||
element_id: entityId,
|
||||
@@ -419,13 +416,7 @@ async function _insertDeletedFileReference(projectId, fileRef) {
|
||||
).exec()
|
||||
}
|
||||
|
||||
async function _removeElementFromMongoArray(
|
||||
model,
|
||||
modelId,
|
||||
path,
|
||||
elementId,
|
||||
deleteRootDoc = false
|
||||
) {
|
||||
async function _removeElementFromMongoArray(model, modelId, path, elementId, deleteRootDoc=false) {
|
||||
const nonArrayPath = path.slice(0, path.lastIndexOf('.'))
|
||||
const options = { new: true }
|
||||
const query = { _id: modelId }
|
||||
|
||||
Reference in New Issue
Block a user