Skip to content

Commit 5aca551

Browse files
authored
Merge pull request #41 from devakone/develop
Release: develop → main
2 parents 0ff93e3 + 44ee5e2 commit 5aca551

7 files changed

Lines changed: 49 additions & 5 deletions

File tree

apps/web/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.vercel
2+
.env*.local

apps/web/src/app/api/og/analysis/[jobId]/route.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ImageResponse } from "@vercel/og";
1+
import { ImageResponse } from "next/og";
22
import { createSupabaseServerClient } from "@/lib/supabase/server";
33
import { computeShareCardMetrics } from "@/lib/vcp/metrics";
44
import { isVibeAxes } from "@/lib/vcp/validators";

apps/web/src/app/api/og/route.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ImageResponse } from "@vercel/og";
1+
import { ImageResponse } from "next/og";
22

33
export const runtime = "edge";
44

apps/web/src/app/api/og/u/[username]/route.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ImageResponse } from "@vercel/og";
1+
import { ImageResponse } from "next/og";
22
import { createClient } from "@supabase/supabase-js";
33
import { getPersonaAura } from "@/lib/persona-auras";
44

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import { ImageResponse } from "next/og";
2+
3+
export const runtime = "nodejs";
4+
5+
export async function GET(request: Request) {
6+
const url = new URL(request.url);
7+
const test = url.searchParams.get("test") || "basic";
8+
9+
try {
10+
if (test === "basic") {
11+
return new Response("Debug route works", { status: 200 });
12+
}
13+
14+
if (test === "image") {
15+
return new ImageResponse(
16+
(
17+
<div
18+
style={{
19+
width: "100%",
20+
height: "100%",
21+
display: "flex",
22+
alignItems: "center",
23+
justifyContent: "center",
24+
background: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
25+
color: "white",
26+
fontSize: 48,
27+
}}
28+
>
29+
ImageResponse Works!
30+
</div>
31+
),
32+
{ width: 600, height: 400 }
33+
);
34+
}
35+
36+
return new Response(`Unknown test: ${test}`, { status: 400 });
37+
} catch (e: unknown) {
38+
const message = e instanceof Error ? e.message : "Unknown error";
39+
console.error("Debug route error:", e);
40+
return new Response(`Error: ${message}`, { status: 500 });
41+
}
42+
}

apps/web/src/app/api/share/[format]/[userId]/route.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ImageResponse } from "@vercel/og";
1+
import { ImageResponse } from "next/og";
22
import { createClient } from "@supabase/supabase-js";
33
import { getPersonaAura } from "@/lib/persona-auras";
44

apps/web/src/app/api/share/story/[userId]/route.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ImageResponse } from "@vercel/og";
1+
import { ImageResponse } from "next/og";
22
import QRCode from "qrcode";
33
import { createSupabaseServerClient } from "@/lib/supabase/server";
44
import { computeShareCardMetrics } from "@/lib/vcp/metrics";

0 commit comments

Comments
 (0)