overleaf/services/web/app/coffee/Features/Analytics/AnalyticsRouter.coffee
2018-01-22 15:10:52 +00:00

11 lines
521 B
CoffeeScript

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