Scheduling infrastructure for absolutely everyone.
fix sentry errors (#20005)
sean-brydon960a36817561
diff --git a/apps/web/app/api/avatar/[uuid]/route.ts b/apps/web/app/api/avatar/[uuid]/route.tsindex c6e9a59083f..1ec20964d07 100644--- a/apps/web/app/api/avatar/[uuid]/route.ts+++ b/apps/web/app/api/avatar/[uuid]/route.ts@@ -4,7 +4,7 @@ import type { NextRequest } from "next/server";import { NextResponse } from "next/server";import { z } from "zod";-import { AVATAR_FALLBACK } from "@calcom/lib/constants";+import { AVATAR_FALLBACK, WEBAPP_URL } from "@calcom/lib/constants";import prisma from "@calcom/prisma";const querySchema = z.object({@@ -47,7 +47,8 @@ async function handler(req: NextRequest, { params }: { params: Params }) {img = data;} catch (e) {// If anything goes wrong or avatar is not found, use default avatar- return NextResponse.redirect(AVATAR_FALLBACK, 302);+ const url = new URL(AVATAR_FALLBACK, WEBAPP_URL).toString();+ return NextResponse.redirect(url, 302);}const decoded = img.toString().replace("data:image/png;base64,", "").replace("data:image/jpeg;base64,", "");