add logging to tell us how long since a project that is being opened was last updated

This commit is contained in:
Henry Oswald 2015-07-22 10:38:48 +01:00
parent c12213b46b
commit 417fd4f5f5

View file

@ -193,11 +193,13 @@ module.exports = ProjectController =
if err?
logger.err err:err, "error getting details for project page"
return next err
logger.log project_id:project_id, "got db results for loading editor"
project = results.project
user = results.user
subscription = results.subscription
daysSinceLastUpdated = (new Date() - project.lastUpdated) /86400000
logger.log project_id:project_id, daysSinceLastUpdated:daysSinceLastUpdated, "got db results for loading editor"
SecurityManager.userCanAccessProject user, project, (canAccess, privilegeLevel)->
if !canAccess
return res.sendStatus 401