Refactor ImageResponse route signatures

This commit is contained in:
Sam Becker 2023-09-19 19:24:21 -05:00
parent 5e0a088d4f
commit e08745f298
5 changed files with 6 additions and 6 deletions

View File

@ -23,5 +23,5 @@ export async function GET(request: Request): Promise<ImageResponse> {
return new ImageResponse(
<HomeImageResponse {...{ photos, request, width, height }}/>,
{ width, height, headers },
);
) as Response;
}

View File

@ -28,5 +28,5 @@ export async function GET(
return new ImageResponse(
<PhotoImageResponse {...{ photo, request, width, height, fontFamily }} />,
{ width, height, fonts, headers },
);
) as Response;
}

View File

@ -34,5 +34,5 @@ export async function GET(
return new ImageResponse(
<TagImageResponse {...{ photos, request, width, height, fontFamily }}/>,
{ width, height, fonts, headers },
);
) as Response;
}

View File

@ -12,7 +12,7 @@ import { ImageResponse } from '@vercel/og';
export const runtime = 'edge';
export async function GET(request: Request): Promise<ImageResponse> {
export async function GET(request: Request) {
const photos = await getPhotos('priority', MAX_PHOTOS_TO_SHOW_TEMPLATE_TIGHT);
const {
@ -42,5 +42,5 @@ export async function GET(request: Request): Promise<ImageResponse> {
fonts,
headers,
},
);
) as Response;
}

View File

@ -33,5 +33,5 @@ export async function GET(request: Request): Promise<ImageResponse> {
}}/>
),
{ width, height, fonts, headers },
);
) as Response;
}