mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
23 lines
531 B
CoffeeScript
23 lines
531 B
CoffeeScript
express = require("express")
|
|
app = express()
|
|
|
|
module.exports = MockTrackChangesApi =
|
|
flushDoc: (doc_id, callback = (error) ->) ->
|
|
callback()
|
|
|
|
run: () ->
|
|
app.post "/project/:project_id/doc/:doc_id/flush", (req, res, next) =>
|
|
@flushDoc req.params.doc_id, (error) ->
|
|
if error?
|
|
res.send 500
|
|
else
|
|
res.send 204
|
|
|
|
app.listen 3015, (error) ->
|
|
throw error if error?
|
|
.on "error", (error) ->
|
|
console.error "error starting MockTrackChangesApi:", error.message
|
|
process.exit(1)
|
|
|
|
MockTrackChangesApi.run()
|
|
|