This pull request fixes a bug in the registerUser function where temporary files uploaded via multer were not being deleted if a user already exists, leading to orphaned files on the server.
The fix involves adding logic to delete these files before throwing an error when a user with the same email or username is found
This pull request fixes a bug in the registerUser function where temporary files uploaded via multer were not being deleted if a user already exists, leading to orphaned files on the server.
The fix involves adding logic to delete these files before throwing an error when a user with the same email or username is found