Skip to content

Commit

Permalink
fix: Avatar API isn't ran at signup handler (#14675)
Browse files Browse the repository at this point in the history
  • Loading branch information
emrysal committed Apr 22, 2024
1 parent 0306ad7 commit 0013166
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/features/auth/signup/handlers/calcomHandler.ts
Expand Up @@ -5,6 +5,7 @@ import { getPremiumMonthlyPlanPriceId } from "@calcom/app-store/stripepayment/li
import { hashPassword } from "@calcom/features/auth/lib/hashPassword";
import { sendEmailVerification } from "@calcom/features/auth/lib/verifyEmail";
import { createOrUpdateMemberships } from "@calcom/features/auth/signup/utils/createOrUpdateMemberships";
import { prefillAvatar } from "@calcom/features/auth/signup/utils/prefillAvatar";
import { WEBAPP_URL } from "@calcom/lib/constants";
import { getLocaleFromRequest } from "@calcom/lib/getLocaleFromRequest";
import { HttpError } from "@calcom/lib/http-error";
Expand Down Expand Up @@ -201,7 +202,9 @@ async function handler(req: RequestWithUsernameStatus, res: NextApiResponse) {
},
},
});

if (process.env.AVATARAPI_USERNAME && process.env.AVATARAPI_PASSWORD) {
await prefillAvatar({ email });
}
sendEmailVerification({
email,
language: await getLocaleFromRequest(req),
Expand Down

0 comments on commit 0013166

Please sign in to comment.