mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
don't try and send requests when analytics isn't enabled
This commit is contained in:
parent
d87067bc2f
commit
411b5324df
1 changed files with 8 additions and 0 deletions
|
@ -4,9 +4,17 @@ _ = require "underscore"
|
|||
request = require "request"
|
||||
|
||||
|
||||
makeRequest: (opts, callback)->
|
||||
if settings.apis?.analytics?.url?
|
||||
request opts, callback
|
||||
else
|
||||
callback()
|
||||
|
||||
|
||||
|
||||
module.exports =
|
||||
|
||||
|
||||
recordEvent: (user_id, event, segmentation = {}, callback = (error) ->) ->
|
||||
opts =
|
||||
body:
|
||||
|
|
Loading…
Reference in a new issue