diff --git a/pages/api/social-image.tsx b/pages/api/social-image.tsx index d0348d367c..7c10f3358a 100644 --- a/pages/api/social-image.tsx +++ b/pages/api/social-image.tsx @@ -1,7 +1,6 @@ import * as React from 'react' -import { NextRequest } from 'next/server' -import { ImageResponse } from '@vercel/og' +import { ImageResponse } from 'next/og' import { api, apiHost, rootNotionPageId } from '@/lib/config' import { NotionPageInfo } from '@/lib/types' @@ -14,11 +13,9 @@ const interBoldFontP = fetch( new URL('../../public/fonts/Inter-SemiBold.ttf', import.meta.url) ).then((res) => res.arrayBuffer()) -export const config = { - runtime: 'edge' -} +export const runtime = 'edge' -export async function get(req: NextRequest) { +export default async function GET(req: Request) { const { searchParams } = new URL(req.url) const pageId = searchParams.get('id') || rootNotionPageId if (!pageId) {