digitalungdom-se / digitalungdom-api

GNU Affero General Public License v3.0
2 stars 0 forks source link

Add simple check to see if username is registered #4

Open Nautman opened 4 years ago

Nautman commented 4 years ago

I know it's possible to use get("/user"), but I don't need to get back all information on their profile just to see if the username is available.

kelszo commented 4 years ago

Should this be done by sending specific error codes on registration or another route for checking username?

Nautman commented 4 years ago

Another route. The route doesn't need to send error codes. To be clear, this change isn't even necessary as the previous way works. But you could argue it's better.

kelszo commented 4 years ago

Will add this if needed in the future. One could add just a query parameter like ?fields=none that only returns true/false.

Nautman commented 4 years ago

That'd work perfectly.