mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
20 lines
419 B
CoffeeScript
20 lines
419 B
CoffeeScript
|
express = require("express")
|
||
|
app = express()
|
||
|
|
||
|
module.exports = MockProjectHistoryApi =
|
||
|
flushProject: (doc_id, callback = (error) ->) ->
|
||
|
callback()
|
||
|
|
||
|
run: () ->
|
||
|
app.post "/project/:project_id/flush", (req, res, next) =>
|
||
|
@flushProject req.params.project_id, (error) ->
|
||
|
if error?
|
||
|
res.send 500
|
||
|
else
|
||
|
res.send 204
|
||
|
|
||
|
app.listen 3054, (error) ->
|
||
|
throw error if error?
|
||
|
|
||
|
MockProjectHistoryApi.run()
|