mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
only need to load rootFolder from project
This commit is contained in:
parent
feb02dacd4
commit
2a0b0d3a87
1 changed files with 3 additions and 3 deletions
|
@ -171,7 +171,7 @@ module.exports = ProjectEntityHandler =
|
|||
return cb(null, project_or_id)
|
||||
else # id
|
||||
# need to retrieve full project structure to check for duplicates
|
||||
return ProjectGetter.getProject project_or_id, {}, cb
|
||||
return ProjectGetter.getProject project_or_id, {rootFolder:true, name:true}, cb
|
||||
getProject (error, project) ->
|
||||
if err?
|
||||
logger.err project_id:project_id, err:err, "error getting project for add doc"
|
||||
|
@ -208,7 +208,7 @@ module.exports = ProjectEntityHandler =
|
|||
ProjectEntityHandler.addDoc project_id, null, name, lines, callback
|
||||
|
||||
addFileWithoutUpdatingHistory: (project_id, folder_id, fileName, path, userId, callback = (error, fileRef, folder_id, path, fileStoreUrl) ->)->
|
||||
ProjectGetter.getProject project_id, {}, (err, project) ->
|
||||
ProjectGetter.getProject project_id, {rootFolder:true, name:true}, (err, project) ->
|
||||
if err?
|
||||
logger.err project_id:project_id, err:err, "error getting project for add file"
|
||||
return callback(err)
|
||||
|
@ -341,7 +341,7 @@ module.exports = ProjectEntityHandler =
|
|||
callback(null, folders, lastFolder)
|
||||
|
||||
addFolder: (project_id, parentFolder_id, folderName, callback) ->
|
||||
ProjectGetter.getProject project_id, {}, (err, project)=>
|
||||
ProjectGetter.getProject project_id, {rootFolder:true, name:true}, (err, project)=>
|
||||
if err?
|
||||
logger.err project_id:project_id, err:err, "error getting project for add folder"
|
||||
return callback(err)
|
||||
|
|
Loading…
Reference in a new issue