changed :project_id to :Project_id

This commit is contained in:
Henry Oswald 2014-07-14 22:11:41 +01:00
parent 0aa6a206e7
commit 9f82e63a8f
3 changed files with 5 additions and 5 deletions

View file

@ -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)->

View file

@ -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

View file

@ -27,7 +27,7 @@ describe "ChatController", ->
@req =
params:
project_id:@project_id
Project_id:@project_id
session:
user:
_id:@user_id