don't try and send requests when analytics isn't enabled

This commit is contained in:
Henry Oswald 2016-11-15 10:54:48 +00:00
parent d87067bc2f
commit 411b5324df

View file

@ -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: