From 60dfe538b0aa48055dd6a9f2462b1044e95906aa Mon Sep 17 00:00:00 2001 From: eric Date: Mon, 8 Jun 2026 02:41:03 -0500 Subject: [PATCH] Fix production TypeScript build errors across meetups, media proxy, and join modal. Co-authored-by: Cursor --- app/[locale]/meetups/page.tsx | 2 +- app/api/media/proxy/route.ts | 2 +- app/components/JoinModal.tsx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/[locale]/meetups/page.tsx b/app/[locale]/meetups/page.tsx index cbbeaa3..fcf3d89 100644 --- a/app/[locale]/meetups/page.tsx +++ b/app/[locale]/meetups/page.tsx @@ -46,7 +46,7 @@ interface Meetup { accessLevel: MeetupAccessLevel; meetingProvider: string; mirotalkRoom: string; - loungeChannel: string; + loungeChannel?: string; meetingUrl: string; replayUrl: string; features: string[]; diff --git a/app/api/media/proxy/route.ts b/app/api/media/proxy/route.ts index 47ddd06..0b4e274 100644 --- a/app/api/media/proxy/route.ts +++ b/app/api/media/proxy/route.ts @@ -59,7 +59,7 @@ async function objectExists(client: ReturnType, bucket: s } function passthroughResponse(buffer: Buffer, contentType: string): NextResponse { - return new NextResponse(buffer, { + return new NextResponse(new Uint8Array(buffer), { status: 200, headers: { "Content-Type": contentType, diff --git a/app/components/JoinModal.tsx b/app/components/JoinModal.tsx index 45f9ce4..c5708f8 100644 --- a/app/components/JoinModal.tsx +++ b/app/components/JoinModal.tsx @@ -83,10 +83,10 @@ export default function JoinModal({ isOpen, onClose, initialEmail = "", vipOnly method: "POST", body: JSON.stringify({ email: em }), }); - if (!data?.ok) { + if (!data?.ok || !data.token) { throw new Error(data?.error || (locale === "zh" ? "操作失败" : "Operation failed")); } - await saveAuth(data.token, data.record); + await saveAuth(data.token, data.record ?? {}); continueAfterAuth(String(data.user_id)); } catch (err) { setError(err instanceof Error ? err.message : "操作失败");