feat: removed unused inviteSignup flag

This commit is contained in:
Akhil Mohan
2024-02-22 13:09:51 +05:30
parent 97d2a15d3e
commit fed022ed09
10 changed files with 10 additions and 40 deletions
+1 -2
View File
@@ -32,8 +32,7 @@ export const registerAdminRouter = async (server: FastifyZodProvider) => {
schema: {
body: z.object({
allowSignUp: z.boolean().optional(),
inviteOnlySignUp: z.boolean().optional(),
allowedSignUpDomain: z.string().optional()
allowedSignUpDomain: z.string().optional().nullable()
}),
response: {
200: z.object({
@@ -187,13 +187,6 @@ export const registerSignupRouter = async (server: FastifyZodProvider) => {
if (!userAgent) throw new Error("user agent header is required");
const appCfg = getConfig();
const serverCfg = await getServerCfg();
if (!serverCfg.allowSignUp) {
throw new BadRequestError({
message: "Sign up is disabled!"
});
}
const { user, accessToken, refreshToken } = await server.services.signup.completeAccountInvite({
...req.body,
ip: req.realIp,