From 152a25e96dd86e25b40e238488e32a4df958a90b Mon Sep 17 00:00:00 2001 From: Hayden Faulds Date: Wed, 7 Mar 2018 13:29:09 +0000 Subject: [PATCH] rename resyncProject -> resyncProjectHistory --- services/document-updater/app.coffee | 2 +- services/document-updater/app/coffee/HistoryManager.coffee | 2 +- services/document-updater/app/coffee/HttpController.coffee | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/services/document-updater/app.coffee b/services/document-updater/app.coffee index 3768146b34..1d6a57239e 100644 --- a/services/document-updater/app.coffee +++ b/services/document-updater/app.coffee @@ -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 diff --git a/services/document-updater/app/coffee/HistoryManager.coffee b/services/document-updater/app/coffee/HistoryManager.coffee index 03fb8b31f3..b4f74d6170 100644 --- a/services/document-updater/app/coffee/HistoryManager.coffee +++ b/services/document-updater/app/coffee/HistoryManager.coffee @@ -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" diff --git a/services/document-updater/app/coffee/HttpController.coffee b/services/document-updater/app/coffee/HttpController.coffee index 3793146f38..4a7ff3b302 100644 --- a/services/document-updater/app/coffee/HttpController.coffee +++ b/services/document-updater/app/coffee/HttpController.coffee @@ -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