diff --git a/services/web/app/coffee/Features/ReferencesSearch/ReferencesSearchController.coffee b/services/web/app/coffee/Features/ReferencesSearch/ReferencesSearchController.coffee index c4182fff44..5f4fadde4e 100644 --- a/services/web/app/coffee/Features/ReferencesSearch/ReferencesSearchController.coffee +++ b/services/web/app/coffee/Features/ReferencesSearch/ReferencesSearchController.coffee @@ -9,21 +9,20 @@ module.exports = ReferencesSearchController = indexFile: (req, res) -> project_id = req.params.Project_id - user_id = req.session.user._id doc_id = req.body.docId - logger.log {project_id, user_id, doc_id}, "indexing references" + logger.log {project_id, doc_id}, "indexing references" if !doc_id - logger.log project_id: project_id, user_id: user_id, "no fileUrl supplied" + logger.log project_id: project_id, "no fileUrl supplied" return res.send 400 ProjectLocator.findElement {project_id: project_id, element_id: doc_id, type: 'doc'}, (err, doc) -> if err? - logger.err {err, project_id, user_id, doc_id}, "error finding element for downloading file" + logger.err {err, project_id, doc_id}, "error finding doc to index" return res.send 500 doc_url = ReferencesSearchController._buildDocUrl project_id, doc_id - ReferencesSearchHandler.indexFile user_id, doc_url, (err) -> + ReferencesSearchHandler.indexFile project_id, doc_url, (err) -> if err - logger.err {err, project_id, user_id, doc_id}, "error indexing references file" + logger.err {err, project_id, doc_id}, "error indexing references file" return res.send 500 res.send 200 diff --git a/services/web/app/coffee/Features/ReferencesSearch/ReferencesSearchHandler.coffee b/services/web/app/coffee/Features/ReferencesSearch/ReferencesSearchHandler.coffee index 82a46c2c56..262c99226e 100644 --- a/services/web/app/coffee/Features/ReferencesSearch/ReferencesSearchHandler.coffee +++ b/services/web/app/coffee/Features/ReferencesSearch/ReferencesSearchHandler.coffee @@ -8,9 +8,9 @@ fiveMinsInMs = oneMinInMs * 5 module.exports = ReferencesSearchHandler = - indexFile: (user_id, file_url, callback = (err)->) -> - logger.log {user_id, file_url}, "sending index request to references api" - url = "#{settings.apis.references.url}/user/#{user_id}" + indexFile: (project_id, file_url, callback = (err)->) -> + logger.log {project_id, file_url}, "sending index request to references api" + url = "#{settings.apis.references.url}/project/#{project_id}" request.post { url: url json: @@ -22,5 +22,5 @@ module.exports = ReferencesSearchHandler = return callback(null) else err = new Error("references api responded with non-success code: #{res.statusCode}") - logger.log {err, user_id, file_url}, "error updating references" + logger.log {err, project_id, file_url}, "error updating references" return callback(err)