-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Socket call doesn't execute same controller action override HTTP call does. #535
Comments
hi @toddrimes- what version of sails are you running? |
Hi, Mike: sails@0.8.94 Thank you, On Mon, Jul 8, 2013 at 6:05 AM, Mike McNeil notifications@github.comwrote:
|
Hey Todd, they should. This should be resolved in 0.9- after we get that out the door, I'll swing back by for a hot fix. Thanks! |
cool, thank you! Is that days or weeks away? On Mon, Jul 8, 2013 at 9:38 PM, Mike McNeil notifications@github.comwrote:
|
@toddrimes sorry I missed your note here-- 0.9 came out over the summer. Thanks for your help! If you're still encountering this issue in v0.10, would you reopen this issue or create a new one and mention me? (
Contribution Guide | Stackoverflow | Google Group | Trello | IRC |
/---------------------
:: Messages
-> controller
---------------------/
var MessagesController = {
index: function (req,res) {
var user = req.session.user;
var group_id = user.group_id;
Messages.findAllByGroup_id(group_id).limit(50).sort('createdAt DESC').done(function (err, messages) {
if (err) return res.send(err,500);
else res.send({ messages: messages });
});
}
};
module.exports = MessagesController;
I have that override of the MessagesController index action, with routes.js updated with it. The app is group chat where X users could each be "chatting" in exactly one of Y groups. Each user should only post/receive messages to/from their group and never have access to those of other groups(otherwise I could filter on the client).
Override method /messages/index works fine from the browser and I can set and hit a breakpoint in my IDE to verify it's executing. However, I do not hit the breakpoint when I use a socket pointing at /messages. Shouldn't they behave the same? What am I doing wrong?
The text was updated successfully, but these errors were encountered: