mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-31 21:21:03 -04: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]
|