mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
6 lines
249 B
CoffeeScript
6 lines
249 B
CoffeeScript
|
{db, ObjectId} = require "./mongojs"
|
||
|
|
||
|
module.exports = MongoManager =
|
||
|
findProject: (project_id, callback = (error, project) ->) ->
|
||
|
db.projects.find _id: ObjectId(project_id.toString()), {}, (error, projects = []) ->
|
||
|
callback error, projects[0]
|