I noticed that i have used the same email to send a register POST request multiple times and the register route does not throw an error, like email already exist.
There is need for a middleware function to control the register POST request body, and check. If email already exist, throw an appropriate error.
Email should be unique
I noticed that i have used the same email to send a register POST request multiple times and the
register
route does not throw an error, likeemail already exist
.email
already exist, throw an appropriate error.