mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-30 10:44:10 -05:00
stop the /announcements call at controller level
This commit is contained in:
parent
5a13ee1077
commit
666bfdf967
2 changed files with 3 additions and 3 deletions
|
@ -6,6 +6,9 @@ logger = require("logger-sharelatex")
|
|||
module.exports =
|
||||
|
||||
getUndreadAnnouncements: (req, res, next)->
|
||||
if !settings?.apis?.analytics?.url? or !settings.apis.blog.url?
|
||||
return res.json []
|
||||
|
||||
user_id = AuthenticationController.getLoggedInUserId(req)
|
||||
logger.log {user_id}, "getting unread announcements"
|
||||
AnnouncementsHandler.getUnreadAnnouncements user_id, (err, announcements)->
|
||||
|
|
|
@ -8,9 +8,6 @@ settings = require("settings-sharelatex")
|
|||
module.exports =
|
||||
|
||||
getUnreadAnnouncements : (user_id, callback = (err, announcements)->)->
|
||||
if !settings?.apis?.analytics?.url? or !settings.apis.blog.url?
|
||||
return callback null, []
|
||||
|
||||
async.parallel {
|
||||
lastEvent: (cb)->
|
||||
AnalyticsManager.getLastOccurance user_id, "announcement-alert-dismissed", cb
|
||||
|
|
Loading…
Reference in a new issue