Skip to content

Commit

Permalink
Change social image get
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksongoode committed Feb 7, 2024
1 parent 904df4a commit 06a1f55
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions pages/api/social-image.tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -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) {
Expand Down

0 comments on commit 06a1f55

Please sign in to comment.