From fc87557902a85bb7b0ec6f15efa19af12685ff0c Mon Sep 17 00:00:00 2001 From: zomars Date: Fri, 5 Aug 2022 15:08:36 -0600 Subject: [PATCH 1/2] Fixes callbackUrl --- auth/signup.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/auth/signup.tsx b/auth/signup.tsx index 8dc735ddab..6a04c71ecc 100644 --- a/auth/signup.tsx +++ b/auth/signup.tsx @@ -9,7 +9,7 @@ import Button from "@calcom/ui/Button"; import { EmailField, PasswordField, TextField } from "@calcom/ui/form/fields"; import { HeadSeo } from "@calcom/web/components/seo/head-seo"; import { asStringOrNull } from "@calcom/web/lib/asStringOrNull"; -import { WEBSITE_URL, WEBAPP_URL } from "@calcom/web/lib/config/constants"; +import { WEBAPP_URL } from "@calcom/web/lib/config/constants"; import prisma from "@calcom/web/lib/prisma"; import { isSAMLLoginEnabled } from "@calcom/web/lib/saml"; import { IS_GOOGLE_LOGIN_ENABLED } from "@calcom/web/server/lib/constants"; @@ -53,7 +53,7 @@ export default function Signup() { .then( async () => await signIn("Cal.com", { - callbackUrl: (`${WEBSITE_URL}/${router.query.callbackUrl}` || "") as string, + callbackUrl: (`${WEBAPP_URL}/${router.query.callbackUrl}` || "") as string, }) ) .catch((err) => { From 80bd5068d498880cfb90e2352b59857e4a2699e7 Mon Sep 17 00:00:00 2001 From: Agusti Fernandez Pardo Date: Tue, 6 Sep 2022 19:20:04 +0200 Subject: [PATCH 2/2] fix: don't use defaultHandler w promise in api yet, was from console --- pages/api/me/_get.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pages/api/me/_get.ts b/pages/api/me/_get.ts index 7fe25139a8..40a518f9ae 100644 --- a/pages/api/me/_get.ts +++ b/pages/api/me/_get.ts @@ -1,6 +1,6 @@ import type { NextApiRequest } from "next"; -import { defaultHandler, defaultResponder } from "@calcom/lib/server"; +import { defaultResponder } from "@calcom/lib/server"; import { schemaUserReadPublic } from "@lib/validations/user"; @@ -16,6 +16,4 @@ async function handler(req: NextApiRequest): Promise<{ error?: string; user?: Pa return { user }; } -export default defaultHandler({ - GET: Promise.resolve({ default: defaultResponder(handler) }), -}); +export default defaultResponder(handler);