mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
fixup AuthenticationController from missing module after merge
This commit is contained in:
parent
67943a8906
commit
f27dfa54f1
1 changed files with 8 additions and 8 deletions
|
@ -1,15 +1,15 @@
|
|||
AnalyticsManager = require "./AnalyticsManager"
|
||||
Errors = require "../Errors/Errors"
|
||||
|
||||
AuthenticationController = require("../Authentication/AuthenticationController")
|
||||
|
||||
module.exports = AnalyticsController =
|
||||
recordEvent: (req, res, next) ->
|
||||
user_id = AuthenticationController.getLoggedInUserId(req) or req.sessionID
|
||||
AnalyticsManager.recordEvent user_id, req.params.event, req.body, (error) ->
|
||||
if error?
|
||||
if error instanceof Errors.ServiceNotConfiguredError
|
||||
# ignore, no-op
|
||||
return res.send(204)
|
||||
else
|
||||
return next(error)
|
||||
res.send 204
|
||||
if error instanceof Errors.ServiceNotConfiguredError
|
||||
# ignore, no-op
|
||||
return res.send(204)
|
||||
else if error?
|
||||
return next(error)
|
||||
else
|
||||
return res.send 204
|
||||
|
|
Loading…
Reference in a new issue