2017-12-21 08:51:52 -05:00
|
|
|
AuthenticationController = require './../Authentication/AuthenticationController'
|
2015-06-30 09:38:32 -04:00
|
|
|
AnalyticsController = require('./AnalyticsController')
|
2017-12-21 08:51:52 -05:00
|
|
|
AnalyticsProxy = require('./AnalyticsProxy')
|
2015-06-30 09:38:32 -04:00
|
|
|
|
|
|
|
module.exports =
|
2018-01-11 02:34:24 -05:00
|
|
|
apply: (webRouter, privateApiRouter, publicApiRouter) ->
|
2015-06-30 09:38:32 -04:00
|
|
|
webRouter.post '/event/:event', AnalyticsController.recordEvent
|
2018-01-11 02:34:24 -05:00
|
|
|
publicApiRouter.use '/analytics/graphs',
|
2017-12-21 08:51:52 -05:00
|
|
|
AuthenticationController.httpAuth,
|
|
|
|
AnalyticsProxy.call('/graphs')
|