overleaf/services/track-changes/app/coffee/HttpController.coffee

12 lines
409 B
CoffeeScript
Raw Normal View History

HistoryManager = require "./HistoryManager"
logger = require "logger-sharelatex"
module.exports = HttpController =
2014-02-26 06:34:56 -05:00
flushUpdatesWithLock: (req, res, next = (error) ->) ->
doc_id = req.params.doc_id
2014-02-26 06:34:56 -05:00
logger.log doc_id: doc_id, "compressing doc history"
HistoryManager.processUncompressedUpdatesWithLock doc_id, (error) ->
return next(error) if error?
2014-02-26 07:11:45 -05:00
logger.log "done http request"
res.send 204