Closed gtheilman closed 8 years ago
I think you want to hit this endpoint: https://github.com/tjwebb/sails-auth/blob/master/api/controllers/UserController.js#L12
I would try:
'POST /users': 'UserController.create'
Thanks for the pointer. Part of the problem was I kept searching through the "sails-permission" directory for the endpoint rather than the "sails-auth" directory.
Unfortunately, neither
'POST /users': 'UserController.create'
nor
'POST /user': 'UserController.create'
fixes the problem. Sails still reports a 404 error when looking for /user. Works fine if /users
is used, instead.
However, that's not an issue with sails-permissions, so I would consider this issue "closed".
I'm using sails-generate-ember-blueprints which requires that pluralize be set to 'true' in blueprints.js.
As a result, in order to add a new user, I'm having to post to '/users' rather than '/user'.
I'm sure what I need to do is put a custom route in routes.js to redirect requests to 'post /user' to the correct location. However, I can't figure out what location to use.
So far, I've tried
I'm thinking it probably needs to be something like
Any thoughts?