Fix nit changes
parent
885ea4b025
commit
7b4f9ba537
|
@ -1,7 +1,7 @@
|
||||||
import type { NextApiResponse } from "next";
|
import type { NextApiResponse } from "next";
|
||||||
|
|
||||||
import calcomSignupHandler from "@calcom/feature-auth/signup/handlers/calcomHandler";
|
import calcomSignupHandler from "@calcom/feature-auth/signup/handlers/calcomHandler";
|
||||||
import selfhostedSignupHandler from "@calcom/feature-auth/signup/handlers/selfHostedHandler";
|
import selfHostedSignupHandler from "@calcom/feature-auth/signup/handlers/selfHostedHandler";
|
||||||
import { type RequestWithUsernameStatus } from "@calcom/features/auth/signup/username";
|
import { type RequestWithUsernameStatus } from "@calcom/features/auth/signup/username";
|
||||||
import { IS_CALCOM } from "@calcom/lib/constants";
|
import { IS_CALCOM } from "@calcom/lib/constants";
|
||||||
import { HttpError } from "@calcom/lib/http-error";
|
import { HttpError } from "@calcom/lib/http-error";
|
||||||
|
@ -30,8 +30,9 @@ export default async function handler(req: RequestWithUsernameStatus, res: NextA
|
||||||
ensureReqIsPost(req);
|
ensureReqIsPost(req);
|
||||||
ensureSignupIsEnabled();
|
ensureSignupIsEnabled();
|
||||||
|
|
||||||
/** Im not sure its worth merging these two handlers. They are different enough to be separate.
|
/**
|
||||||
* Calcom handles things like creating a stripe customer - which we dont need to do for self hosted.
|
* Im not sure its worth merging these two handlers. They are different enough to be separate.
|
||||||
|
* Calcom handles things like creating a stripe customer - which we don't need to do for self hosted.
|
||||||
* It also handles things like premium username.
|
* It also handles things like premium username.
|
||||||
* TODO: (SEAN) - Extract a lot of the logic from calcomHandler into a separate file and import it into both handlers.
|
* TODO: (SEAN) - Extract a lot of the logic from calcomHandler into a separate file and import it into both handlers.
|
||||||
*/
|
*/
|
||||||
|
@ -39,7 +40,7 @@ export default async function handler(req: RequestWithUsernameStatus, res: NextA
|
||||||
return await calcomSignupHandler(req, res);
|
return await calcomSignupHandler(req, res);
|
||||||
}
|
}
|
||||||
|
|
||||||
return await selfhostedSignupHandler(req, res);
|
return await selfHostedSignupHandler(req, res);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e instanceof HttpError) {
|
if (e instanceof HttpError) {
|
||||||
return res.status(e.statusCode).json({ message: e.message });
|
return res.status(e.statusCode).json({ message: e.message });
|
||||||
|
|
|
@ -5,7 +5,6 @@ import type { GetServerSidePropsContext } from "next";
|
||||||
import { getCsrfToken, signIn } from "next-auth/react";
|
import { getCsrfToken, signIn } from "next-auth/react";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter, useSearchParams } from "next/navigation";
|
import { useRouter, useSearchParams } from "next/navigation";
|
||||||
import { NextLink } from "next/link";
|
|
||||||
import type { CSSProperties } from "react";
|
import type { CSSProperties } from "react";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { FormProvider, useForm } from "react-hook-form";
|
import { FormProvider, useForm } from "react-hook-form";
|
||||||
|
@ -96,9 +95,9 @@ export default function Login({
|
||||||
callbackUrl = safeCallbackUrl || "";
|
callbackUrl = safeCallbackUrl || "";
|
||||||
|
|
||||||
const LoginFooter = (
|
const LoginFooter = (
|
||||||
<NextLink href="/signup" className="text-brand-500 font-medium">
|
<Link href="/signup" className="text-brand-500 font-medium">
|
||||||
{t("dont_have_an_account")}
|
{t("dont_have_an_account")}
|
||||||
</NextLink>
|
</Link>
|
||||||
);
|
);
|
||||||
|
|
||||||
const TwoFactorFooter = (
|
const TwoFactorFooter = (
|
||||||
|
|
Loading…
Reference in New Issue