Handle missing photo OG response
This commit is contained in:
parent
7f14b69605
commit
3254d40f75
@ -10,7 +10,11 @@ export const runtime = 'edge';
|
|||||||
|
|
||||||
export async function GET(request: Request, context: any) {
|
export async function GET(request: Request, context: any) {
|
||||||
const photo = await getPhoto(context.params.photoId);
|
const photo = await getPhoto(context.params.photoId);
|
||||||
|
|
||||||
|
if (!photo) { return null; }
|
||||||
|
|
||||||
const fontData = await getIBMPlexMonoMedium();
|
const fontData = await getIBMPlexMonoMedium();
|
||||||
|
|
||||||
return new ImageResponse(
|
return new ImageResponse(
|
||||||
(
|
(
|
||||||
<PhotoOGImageResponse
|
<PhotoOGImageResponse
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user