diff --git a/server/lib/readConfigFile.ts b/server/lib/readConfigFile.ts index 9ba21aa4..b136f61f 100644 --- a/server/lib/readConfigFile.ts +++ b/server/lib/readConfigFile.ts @@ -235,25 +235,16 @@ export const configSchema = z dns: z .object({ nameservers: z - .array(z.string().url()) + .array(z.string().optional().optional()) .optional() - .default([ - "ns1.fossorial.io", - "ns2.fossorial.io", - ]), - cname_extension: z - .string() - .optional() - .default("fossorial.io"), - }) + .default(["ns1.fossorial.io", "ns2.fossorial.io"]), + cname_extension: z.string().optional().default("fossorial.io") + }) .optional() .default({ - nameservers: [ - "ns1.fossorial.io", - "ns2.fossorial.io", - ], + nameservers: ["ns1.fossorial.io", "ns2.fossorial.io"], cname_extension: "fossorial.io" - }), + }) }) .refine( (data) => { diff --git a/server/routers/auth/login.ts b/server/routers/auth/login.ts index cd51e46a..8dad5a42 100644 --- a/server/routers/auth/login.ts +++ b/server/routers/auth/login.ts @@ -106,21 +106,21 @@ export async function login( ); } - // Check if user has security keys registered - const userSecurityKeys = await db - .select() - .from(securityKeys) - .where(eq(securityKeys.userId, existingUser.userId)); - - if (userSecurityKeys.length > 0) { - return response(res, { - data: { useSecurityKey: true }, - success: true, - error: false, - message: "Security key authentication required", - status: HttpCode.OK - }); - } + // // Check if user has security keys registered + // const userSecurityKeys = await db + // .select() + // .from(securityKeys) + // .where(eq(securityKeys.userId, existingUser.userId)); + // + // if (userSecurityKeys.length > 0) { + // return response(res, { + // data: { useSecurityKey: true }, + // success: true, + // error: false, + // message: "Security key authentication required", + // status: HttpCode.OK + // }); + // } if ( existingUser.twoFactorSetupRequested && diff --git a/server/routers/domain/createOrgDomain.ts b/server/routers/domain/createOrgDomain.ts index 3e84072f..08718d44 100644 --- a/server/routers/domain/createOrgDomain.ts +++ b/server/routers/domain/createOrgDomain.ts @@ -229,7 +229,7 @@ export async function createOrgDomain( // TODO: This needs to be cross region and not hardcoded if (type === "ns") { - nsRecords = config.getRawConfig().dns.nameservers; + nsRecords = config.getRawConfig().dns.nameservers as string[]; } else if (type === "cname") { cnameRecords = [ {