overleaf/services/web/app/coffee/Features/Analytics/AnalyticsRouter.coffee
2018-01-11 09:34:24 +02:00

10 lines
439 B
CoffeeScript

AuthenticationController = require './../Authentication/AuthenticationController'
AnalyticsController = require('./AnalyticsController')
AnalyticsProxy = require('./AnalyticsProxy')
module.exports =
apply: (webRouter, privateApiRouter, publicApiRouter) ->
webRouter.post '/event/:event', AnalyticsController.recordEvent
publicApiRouter.use '/analytics/graphs',
AuthenticationController.httpAuth,
AnalyticsProxy.call('/graphs')