DEV Community

Discussion on: Devise and JWT in Rails

Collapse
 
prpe profile image
Muhammadreza Haghiri

Hey!
I was implementing auth in my new project following your instructions, and I implemented the registration controller as follows :
gist.github.com/prp-e/14e886c2eb51...
as you can see, I used devise's controllers and modified them.
They seem to be working fine, and this is my request:

curl -X POST -H 'Content-Type: application/json' -i http://localhost:3000/users --data '{
"email":"test@test.com",
"password":"********", 
"password_confirmation" : "********"
}'
Enter fullscreen mode Exit fullscreen mode

So, when I send the request, if it's invalid, it returns the suitable error for being invalid. But when I send valid data, it doesn't return any freaking thing.
I'd be thankful if you help me with this.