castis/seaforium — pull request #97 by notjosh (2013-04-07 22:23:34+00:00)
Title: Added /auth/me call for current login status

Hello sir(s).

I've added a call for `/auth/me` to display your current user information (i.e. to verify login). It's to be polled by remote apps to refresh buddy status and unread messages as well.

With that, the `/auth/login` and `/auth/register` calls also return additional state information (buddy status, unread messages) for consistency.

I also moved avatar URL generation to a helper (there were copy/pasted magic strings in too many places..).

And there is a new function `redirect_with_format()` that will keep that `?format=json` param through a redirect. Sometimes handy if you're not using `->send_json()`, but whatevs.

:cat2: