mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-03 18:45:31 -05:00
13 lines
No EOL
458 B
CoffeeScript
13 lines
No EOL
458 B
CoffeeScript
logger = require "logger-sharelatex"
|
|
request = require "request"
|
|
settings = require "settings-sharelatex"
|
|
|
|
module.exports = TrackChangesController =
|
|
proxyToTrackChangesApi: (req, res, next = (error) ->) ->
|
|
url = settings.apis.trackchanges.url + req.url
|
|
logger.log url: url, "proxying to track-changes api"
|
|
getReq = request.get(url)
|
|
getReq.pipe(res)
|
|
getReq.on "error", (error) ->
|
|
logger.error err: error, "track-changes API error"
|
|
next(error) |