Fix production TypeScript build errors across meetups, media proxy, and join modal.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -46,7 +46,7 @@ interface Meetup {
|
||||
accessLevel: MeetupAccessLevel;
|
||||
meetingProvider: string;
|
||||
mirotalkRoom: string;
|
||||
loungeChannel: string;
|
||||
loungeChannel?: string;
|
||||
meetingUrl: string;
|
||||
replayUrl: string;
|
||||
features: string[];
|
||||
|
||||
@@ -59,7 +59,7 @@ async function objectExists(client: ReturnType<typeof getMinioClient>, 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,
|
||||
|
||||
@@ -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 : "操作失败");
|
||||
|
||||
Reference in New Issue
Block a user