linnovate/mean — pull request #833 by MichaelJCole (2014-10-18 00:20:47+00:00)
Title: Make /register API friendly.  Return 200 on register ok.  Let Angular do...

... the redirect.

Hey, coming back to this after some time. BTW, the new theme looks killer!

I've been working on an off-line angular app. I'd like to use MEAN.IO as the backend.

While playing with the /register route, I found it wan't returning JSON on success. I updated it to my needs, and tested it from the web. It seems to work and all the tests pass.

I think returning the response, or res.status(200) won't actually send the response. You need to call .send().

There's an opportunity to call .send(user) instead, but it includes some internal data which may not be appropriate.

Anyways, hope this helps! Thanks!