mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
32 lines
No EOL
911 B
CoffeeScript
32 lines
No EOL
911 B
CoffeeScript
Project = require('../../models/Project').Project
|
|
logger = require('logger-sharelatex')
|
|
Project = require("../../models/Project").Project
|
|
|
|
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 = {inactive:true}
|
|
Project.update conditions, update, {}, (err)->
|
|
if callback?
|
|
callback()
|
|
|
|
markAsActive: (project_id, callback)->
|
|
conditions = {_id:project_id}
|
|
update = { $unset: { inactive: true }}
|
|
Project.update conditions, update, {}, (err)->
|
|
if callback?
|
|
callback() |