From dc44df3968e6cad6264e09aa4d55c6ab8fef50d2 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Mon, 8 Aug 2022 23:00:01 -0500 Subject: [PATCH] Disable erroring code on createuser to fix no redirect. Disable welcome email. --- functions/src/create-user.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/functions/src/create-user.ts b/functions/src/create-user.ts index c30e78c3..38348603 100644 --- a/functions/src/create-user.ts +++ b/functions/src/create-user.ts @@ -16,7 +16,6 @@ import { cleanDisplayName, cleanUsername, } from '../../common/util/clean-username' -import { sendWelcomeEmail } from './emails' import { isWhitelisted } from '../../common/envs/constants' import { CATEGORIES_GROUP_SLUG_POSTFIX, @@ -94,8 +93,8 @@ export const createuser = newEndpoint(opts, async (req, auth) => { await firestore.collection('private-users').doc(auth.uid).create(privateUser) - await addUserToDefaultGroups(user) - await sendWelcomeEmail(user, privateUser) + // await addUserToDefaultGroups(user) + // await sendWelcomeEmail(user, privateUser) await track(auth.uid, 'create user', { username }, { ip: req.ip }) return user @@ -121,7 +120,7 @@ export const numberUsersWithIp = async (ipAddress: string) => { return snap.docs.length } -const addUserToDefaultGroups = async (user: User) => { +const _addUserToDefaultGroups = async (user: User) => { for (const category of Object.values(DEFAULT_CATEGORIES)) { const slug = category.toLowerCase() + CATEGORIES_GROUP_SLUG_POSTFIX const groups = await getValues(