mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-31 21:21:03 -04:00
31 lines
No EOL
844 B
CoffeeScript
31 lines
No EOL
844 B
CoffeeScript
Project = require('../../models/Project').Project
|
|
logger = require('logger-sharelatex')
|
|
|
|
module.exports =
|
|
markAsUpdated : (project_id, callback)->
|
|
conditions = {_id:project_id}
|
|
update = {lastUpdated:Date.now()}
|
|
Project.update conditions, update, {}, (err)->
|
|
if callback?
|
|
callback()
|
|
|
|
markAsOpened : (project_id, callback)->
|
|
conditions = {_id:project_id}
|
|
update = {lastOpened:Date.now()}
|
|
Project.update conditions, update, {}, (err)->
|
|
if callback?
|
|
callback()
|
|
|
|
markAsInactive: (project_id, callback)->
|
|
conditions = {_id:project_id}
|
|
update = {active:false}
|
|
Project.update conditions, update, {}, (err)->
|
|
if callback?
|
|
callback()
|
|
|
|
markAsActive: (project_id, callback)->
|
|
conditions = {_id:project_id}
|
|
update = {active:true}
|
|
Project.update conditions, update, {}, (err)->
|
|
if callback?
|
|
callback() |