Ben Augarten
Ben Augarten
Hey there, I'm pretty sure this is not an error with node-restful but a misunderstanding in how to use it. If you provide example code, a repository or a gist...
I don't understand your question or what the limitations are with node-restful that would prevent using jwt
Yeah, I think the assumption of ObjectID is baked into the code. It might be nice to get around this, but would require more thought than I have at the...
I don't have any examples, but... ``` js Resource.route('login', 'post', passport.authenticate('local', { successRedirect: '/', failureRedirect: '/login' })); Resource.route('login_facebook', 'post', passport.authenticate('facebook')); ``` etc. `passport.authenticate(...)` just returns a `function(req, res, next) {...
Of course, these are just syntactical sugar for ``` model.route('path_to_route', 'get', function(req, res, next) {..}) ``` and should be easy to implement
Don't call `next()` if you already send the response
Currently this isn't actually supported, but I want to :) The correct verb in this case would be `POST` though
You should be able to do ``` js Task.route('comments', 'post', function(req, res, next) { // Do whatever you want here }) ```
Hey Ashar -- you can looks at the README.md for examples on how to use `before` and `after` properly. To quote directly, ``` js Resource.before('post', hash_password) .before('put', hash_password); function hash_password(req,...
It seems like you're forgetting to include the model id in the restangular delete call. I.e. it should be hitting the route `http://localhost:3000/resources/:id` but its not including the id in...