overleaf/services/web/app/coffee/Features/Analytics/AnalyticsRouter.coffee

11 lines
423 B
CoffeeScript
Raw Normal View History

2017-12-21 08:51:52 -05:00
AuthenticationController = require './../Authentication/AuthenticationController'
AnalyticsController = require('./AnalyticsController')
2017-12-21 08:51:52 -05:00
AnalyticsProxy = require('./AnalyticsProxy')
module.exports =
2017-12-21 08:51:52 -05:00
apply: (webRouter, privateApiRouter) ->
webRouter.post '/event/:event', AnalyticsController.recordEvent
2017-12-21 08:51:52 -05:00
privateApiRouter.use '/analytics/graphs',
AuthenticationController.httpAuth,
AnalyticsProxy.call('/graphs')