📧 fix: Cancel Signup if Email Issuance Fails (#3010)

* fix: user.id assignment in jwtStrategy.js

* refactor(sendEmail): pass params as object, await email sending to propogate errors and restrict registration flow

* fix(Conversations): handle missing updatedAt field

* refactor: use `processDeleteRequest` when deleting user account for user file deletion

* refactor: delete orphaned files when deleting user account

* fix: remove unnecessary 404 status code in server/index.js
This commit is contained in:
Danny Avila 2024-06-08 06:51:29 -04:00 committed by GitHub
parent 084cf266a2
commit 92232afaca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 104 additions and 57 deletions

View file

@ -56,7 +56,7 @@ const updateUser = async function (userId, updateData) {
* Creates a new user, optionally with a TTL of 1 week.
* @param {MongoUser} data - The user data to be created, must contain user_id.
* @param {boolean} [disableTTL=true] - Whether to disable the TTL. Defaults to `true`.
* @returns {Promise<string>} A promise that resolves to the created user document ID.
* @returns {Promise<ObjectId>} A promise that resolves to the created user document ID.
* @throws {Error} If a user with the same user_id already exists.
*/
const createUser = async (data, disableTTL = true) => {