mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-31 21:21:03 -04:00
21 lines
396 B
CoffeeScript
21 lines
396 B
CoffeeScript
|
express = require("express")
|
||
|
app = express()
|
||
|
|
||
|
module.exports = MockTrackChangesApi =
|
||
|
flushDoc: (doc_id, callback = (error) ->) ->
|
||
|
callback()
|
||
|
|
||
|
run: () ->
|
||
|
app.post "/doc/:doc_id/flush", (req, res, next) =>
|
||
|
@flushDoc req.params.doc_id, (error) ->
|
||
|
if error?
|
||
|
res.send 500
|
||
|
else
|
||
|
res.send 204
|
||
|
|
||
|
app.listen 3014, (error) ->
|
||
|
throw error if error?
|
||
|
|
||
|
MockTrackChangesApi.run()
|
||
|
|