Handle missing photo OG response

This commit is contained in:
Sam Becker 2023-09-05 10:44:10 -05:00
parent 7f14b69605
commit 3254d40f75

View File

@ -10,7 +10,11 @@ export const runtime = 'edge';
export async function GET(request: Request, context: any) {
const photo = await getPhoto(context.params.photoId);
if (!photo) { return null; }
const fontData = await getIBMPlexMonoMedium();
return new ImageResponse(
(
<PhotoOGImageResponse