From 1fea2f11217a85fb1389b09ed6acc4d26ad85011 Mon Sep 17 00:00:00 2001 From: Maidul Islam Date: Tue, 14 Nov 2023 14:01:33 -0500 Subject: [PATCH] remove invite only logic from controller --- backend/src/controllers/v1/signupController.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/backend/src/controllers/v1/signupController.ts b/backend/src/controllers/v1/signupController.ts index 065e0c9c..6422808a 100644 --- a/backend/src/controllers/v1/signupController.ts +++ b/backend/src/controllers/v1/signupController.ts @@ -2,7 +2,6 @@ import { Request, Response } from "express"; import { AuthMethod, User } from "../../models"; import { checkEmailVerification, sendEmailVerification } from "../../helpers/signup"; import { createToken } from "../../helpers/auth"; -import { BadRequestError } from "../../utils/errors"; import { getAuthSecret, getJwtSignupLifetime, @@ -67,14 +66,6 @@ export const verifyEmailSignup = async (req: Request, res: Response) => { }); } - // Only one user can create an account without being invited. The rest need to be invited in order to make an account - const userCount = await User.countDocuments({}); - if (userCount != 0) { - throw BadRequestError({ - message: "New user sign ups are not allowed at this time. You must be invited to sign up." - }); - } - // verify email if (await getSmtpConfigured()) { await checkEmailVerification({