All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog.
DELETE /api/users/:id— replaced rawres.json()withsendResponse()wrapper indeleteUserControllerfor consistent API envelope (#212)
DELETE /api/users/:id— added full Swagger spec entry for the soft-delete user endpoint (#212)- Integration tests for
DELETE /api/users/:idcovering 200, 401, 403, 400, 404 and SUPER_ADMIN access (#212) - Double-hashing bug: removed the
UserSchema.pre('save')password hook that causedbcryptto hash an already-hashed value during signup, making all post-signup logins fail (#48) acceptInvitationnow hashes the raw password in the service layer beforeUserModel.create(), consistent with all other flows (#48)
createTeamMemberno longer stores an empty string aspasswordHash; a cryptographically random bcrypt hash is stored instead, ensuringbcrypt.compare(anyInput, placeholder)always returnsfalseuntil the user completes the invitation flow (#48)
- Password hashing is now exclusively the responsibility of the service layer (
auth.service.ts,users.service.ts). TheUserSchemapre-save hook has been removed to enforce a single hashing strategy (#48) - Removed
bcryptimport fromusers.model.ts(no longer needed) (#48)
- Added
tests/password-hashing.test.tscovering signup, invitation acceptance, team member creation, and login round-trip scenarios (#48)