rename resyncProject -> resyncProjectHistory

This commit is contained in:
Hayden Faulds 2018-03-07 13:29:09 +00:00
parent 039f997e80
commit 152a25e96d
3 changed files with 4 additions and 4 deletions

View file

@ -48,7 +48,7 @@ app.post '/project/:project_id/doc/:doc_id/flush', HttpCont
app.delete '/project/:project_id/doc/:doc_id', HttpController.flushAndDeleteDoc
app.delete '/project/:project_id', HttpController.deleteProject
app.post '/project/:project_id', HttpController.updateProject
app.post '/project/:project_id/history/resync', HttpController.resyncProject
app.post '/project/:project_id/history/resync', HttpController.resyncProjectHistory
app.post '/project/:project_id/flush', HttpController.flushProject
app.post '/project/:project_id/doc/:doc_id/change/:change_id/accept', HttpController.acceptChanges
app.post '/project/:project_id/doc/:doc_id/change/accept', HttpController.acceptChanges

View file

@ -64,7 +64,7 @@ module.exports = HistoryManager =
newBlock = Math.floor(length / threshold)
return newBlock != prevBlock
resyncProject: (project_id, docs, files, callback) ->
resyncProjectHistory: (project_id, docs, files, callback) ->
RedisManager.queueResyncProjectStructure project_id, docs, files, (error) ->
return callback(error) if error?
DocumentManager = require "./DocumentManager"

View file

@ -170,10 +170,10 @@ module.exports = HttpController =
logger.log project_id: project_id, "updated project via http"
res.send 204 # No Content
resyncProject: (req, res, next = (error) ->) ->
resyncProjectHistory: (req, res, next = (error) ->) ->
project_id = req.params.project_id
{docs, files} = req.body
HistoryManager.resyncProject project_id, docs, files, (error) ->
HistoryManager.resyncProjectHistory project_id, docs, files, (error) ->
return next(error) if error?
res.send 204