From 9f82e63a8fdf683cbd0d8157d98ea7dadae8dd9f Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Mon, 14 Jul 2014 22:11:41 +0100 Subject: [PATCH] changed :project_id to :Project_id --- services/web/app/coffee/Features/Chat/ChatController.coffee | 4 ++-- services/web/app/coffee/router.coffee | 4 ++-- .../web/test/UnitTests/coffee/Chat/ChatControllerTests.coffee | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/services/web/app/coffee/Features/Chat/ChatController.coffee b/services/web/app/coffee/Features/Chat/ChatController.coffee index 0dfcbe1cf1..f8a6e9065b 100644 --- a/services/web/app/coffee/Features/Chat/ChatController.coffee +++ b/services/web/app/coffee/Features/Chat/ChatController.coffee @@ -6,7 +6,7 @@ module.exports = sendMessage: (req, res)-> - {project_id} = req.params + project_id = req.params.Project_id user_id = req.session.user._id messageContent = req.body.content ChatHandler.sendMessage project_id, user_id, messageContent, (err, builtMessge)-> @@ -17,7 +17,7 @@ module.exports = res.send() getMessages: (req, res)-> - {project_id} = req.params + project_id = req.params.Project_id query = req.body logger.log project_id:project_id, query:query, "getting messages" ChatHandler.getMessages project_id, query, (err, messages)-> diff --git a/services/web/app/coffee/router.coffee b/services/web/app/coffee/router.coffee index 518926b0af..87f3c1b300 100644 --- a/services/web/app/coffee/router.coffee +++ b/services/web/app/coffee/router.coffee @@ -160,8 +160,8 @@ module.exports = class Router app.post "/spelling/check", AuthenticationController.requireLogin(), SpellingController.proxyRequestToSpellingApi app.post "/spelling/learn", AuthenticationController.requireLogin(), SpellingController.proxyRequestToSpellingApi - app.get "/project/:project_id/messages", SecurityManager.requestCanAccessProject, ChatController.getMessages - app.post "/project/:project_id/messages", SecurityManager.requestCanAccessProject, ChatController.sendMessage + app.get "/project/:Project_id/messages", SecurityManager.requestCanAccessProject, ChatController.getMessages + app.post "/project/:Project_id/messages", SecurityManager.requestCanAccessProject, ChatController.sendMessage #Admin Stuff app.get '/admin', SecurityManager.requestIsAdmin, AdminController.index diff --git a/services/web/test/UnitTests/coffee/Chat/ChatControllerTests.coffee b/services/web/test/UnitTests/coffee/Chat/ChatControllerTests.coffee index c9abac1928..c7bc1e952d 100644 --- a/services/web/test/UnitTests/coffee/Chat/ChatControllerTests.coffee +++ b/services/web/test/UnitTests/coffee/Chat/ChatControllerTests.coffee @@ -27,7 +27,7 @@ describe "ChatController", -> @req = params: - project_id:@project_id + Project_id:@project_id session: user: _id:@user_id