Refactor ImageResponse route signatures
This commit is contained in:
parent
5e0a088d4f
commit
e08745f298
@ -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;
|
||||
}
|
||||
|
||||
@ -28,5 +28,5 @@ export async function GET(
|
||||
return new ImageResponse(
|
||||
<PhotoImageResponse {...{ photo, request, width, height, fontFamily }} />,
|
||||
{ width, height, fonts, headers },
|
||||
);
|
||||
) as Response;
|
||||
}
|
||||
|
||||
@ -34,5 +34,5 @@ export async function GET(
|
||||
return new ImageResponse(
|
||||
<TagImageResponse {...{ photos, request, width, height, fontFamily }}/>,
|
||||
{ width, height, fonts, headers },
|
||||
);
|
||||
) as Response;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -33,5 +33,5 @@ export async function GET(request: Request): Promise<ImageResponse> {
|
||||
}}/>
|
||||
),
|
||||
{ width, height, fonts, headers },
|
||||
);
|
||||
) as Response;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user