mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge branch 'ja_email_tokens' of github.com:sharelatex/web-sharelatex into ja_email_tokens
This commit is contained in:
commit
8f2d2cfeff
1 changed files with 0 additions and 17 deletions
|
@ -43,23 +43,6 @@ ProjectSchema.statics.getProject = (project_or_id, fields, callback)->
|
|||
return callback(new Errors.NotFoundError(e.message))
|
||||
this.findById project_or_id, fields, callback
|
||||
|
||||
ProjectSchema.statics.findPopulatedById = (project_id, callback)->
|
||||
logger.log project_id:project_id, "findPopulatedById"
|
||||
this.find(_id: project_id )
|
||||
.populate('collaberator_refs')
|
||||
.populate('readOnly_refs')
|
||||
.populate('owner_ref')
|
||||
.exec (err, projects)->
|
||||
if err?
|
||||
logger.err err:err, project_id:project_id, "something went wrong looking for project findPopulatedById"
|
||||
callback(err)
|
||||
else if !projects? || projects.length == 0
|
||||
logger.err project_id:project_id, "something went wrong looking for project findPopulatedById, no project could be found"
|
||||
callback "not found"
|
||||
else
|
||||
logger.log project_id:project_id, "finished findPopulatedById"
|
||||
callback(null, projects[0])
|
||||
|
||||
sanitizeTypeOfElement = (elementType)->
|
||||
lastChar = elementType.slice -1
|
||||
if lastChar != "s"
|
||||
|
|
Loading…
Reference in a new issue