joven-health-mike / juno-react

A virtual therapy platform designed for K-12 schools.
0 stars 0 forks source link

The server should generate the username for new users #70

Closed joven-health-mike closed 1 year ago

joven-health-mike commented 1 year ago

Current behavior is that the front-end generates the username and sends to the server, hoping it works. Usernames must be unique, so if we send a duplicate username for a new student, this happens:

  1. Identify an existing username in the database.
  2. Click "Add User" (or add student, etc) and enter the username from step 1.

Result - server does not return a response. It should return 409 - CONFLICT.

Instead of fixing this bug, we should redefine the process for creating a username