refactor: Update og route to use async function for GET request

This commit is contained in:
Bram Suurd
2024-08-25 19:42:36 +02:00
parent 93bfbaf5a8
commit 0cb6d9d31b

View File

@@ -1,7 +1,7 @@
import { ImageResponse } from "next/og";
import { NextRequest } from "next/server";
export default function handler(req: NextRequest) {
export async function GET(req: NextRequest) {
const { searchParams } = new URL(req.url);
const title = searchParams.get("title");
const logo = searchParams.get("logo");