Skip to content

Commit

Permalink
refactor: remove useless readablestream
Browse files Browse the repository at this point in the history
  • Loading branch information
QuiiBz committed Mar 17, 2024
1 parent 9bbdfe2 commit 7593d8a
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions apps/dashboard/src/app/api/og/[key]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,7 @@ export async function GET(
const svg = await exportToSvg(reactElements, fonts);
const png = await exportToPng(svg);

const stream = new ReadableStream({
start(controller) {
controller.enqueue(png);
controller.close();
},
});

return new Response(stream, {
return new Response(png, {
headers: {
"Content-Type": "image/png",
},
Expand Down

0 comments on commit 7593d8a

Please sign in to comment.