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)-> sendMessage: (req, res)->
{project_id} = req.params project_id = req.params.Project_id
user_id = req.session.user._id user_id = req.session.user._id
messageContent = req.body.content messageContent = req.body.content
ChatHandler.sendMessage project_id, user_id, messageContent, (err, builtMessge)-> ChatHandler.sendMessage project_id, user_id, messageContent, (err, builtMessge)->
@ -17,7 +17,7 @@ module.exports =
res.send() res.send()
getMessages: (req, res)-> getMessages: (req, res)->
{project_id} = req.params project_id = req.params.Project_id
query = req.body query = req.body
logger.log project_id:project_id, query:query, "getting messages" logger.log project_id:project_id, query:query, "getting messages"
ChatHandler.getMessages project_id, query, (err, 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/check", AuthenticationController.requireLogin(), SpellingController.proxyRequestToSpellingApi
app.post "/spelling/learn", AuthenticationController.requireLogin(), SpellingController.proxyRequestToSpellingApi app.post "/spelling/learn", AuthenticationController.requireLogin(), SpellingController.proxyRequestToSpellingApi
app.get "/project/:project_id/messages", SecurityManager.requestCanAccessProject, ChatController.getMessages app.get "/project/:Project_id/messages", SecurityManager.requestCanAccessProject, ChatController.getMessages
app.post "/project/:project_id/messages", SecurityManager.requestCanAccessProject, ChatController.sendMessage app.post "/project/:Project_id/messages", SecurityManager.requestCanAccessProject, ChatController.sendMessage
#Admin Stuff #Admin Stuff
app.get '/admin', SecurityManager.requestIsAdmin, AdminController.index app.get '/admin', SecurityManager.requestIsAdmin, AdminController.index

View file

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