StefanPenchev05 / MyClothesV2

Welcome to MyClothes, where creativity meets fashion! This application provides a platform for designers to showcase their clothing products, receive feedback through comments and likes, engage in real-time chat, and even get hired by clients who love their work.
MIT License
0 stars 0 forks source link

Extend Username Suggestion Feature to Check Temporary Memory #27

Closed StefanPenchev05 closed 7 months ago

StefanPenchev05 commented 7 months ago

Currently, our username suggestion feature only checks against existing users in the main User collection. This can potentially lead to conflicts when a username is taken in the temporary memory (Temp collection) but not yet in the User collection.

We need to enhance the username suggestion feature to also check the Temp collection. This will ensure that the suggested username is truly unique across both the User and Temp collections.

The changes should be made in the registerController.js file, specifically in the catch block where we handle the case of a username already being taken.

This enhancement will improve the user registration process by preventing potential username conflicts.