Add explicit return types to image response routes
This commit is contained in:
parent
e597b84fe4
commit
5e0a088d4f
@ -10,7 +10,7 @@ import { ImageResponse } from '@vercel/og';
|
||||
|
||||
export const runtime = 'edge';
|
||||
|
||||
export async function GET(request: Request) {
|
||||
export async function GET(request: Request): Promise<ImageResponse> {
|
||||
const photos = await getPhotos(
|
||||
undefined,
|
||||
MAX_PHOTOS_TO_SHOW_HOME,
|
||||
|
||||
@ -8,7 +8,10 @@ import { ImageResponse } from '@vercel/og';
|
||||
|
||||
export const runtime = 'edge';
|
||||
|
||||
export async function GET(request: Request, context: any) {
|
||||
export async function GET(
|
||||
request: Request,
|
||||
context: any,
|
||||
): Promise<ImageResponse | null> {
|
||||
const photo = await getPhoto(context.params.photoId);
|
||||
|
||||
const {
|
||||
|
||||
@ -11,7 +11,10 @@ import { ImageResponse } from '@vercel/og';
|
||||
|
||||
export const runtime = 'edge';
|
||||
|
||||
export async function GET(request: Request, context: any) {
|
||||
export async function GET(
|
||||
request: Request,
|
||||
context: any,
|
||||
): Promise<ImageResponse> {
|
||||
const photos = await getPhotos(
|
||||
undefined,
|
||||
MAX_PHOTOS_TO_SHOW_PER_TAG,
|
||||
|
||||
@ -12,7 +12,7 @@ import { ImageResponse } from '@vercel/og';
|
||||
|
||||
export const runtime = 'edge';
|
||||
|
||||
export async function GET(request: Request) {
|
||||
export async function GET(request: Request): Promise<ImageResponse> {
|
||||
const photos = await getPhotos('priority', MAX_PHOTOS_TO_SHOW_TEMPLATE_TIGHT);
|
||||
|
||||
const {
|
||||
|
||||
@ -12,7 +12,7 @@ import { ImageResponse } from '@vercel/og';
|
||||
|
||||
export const runtime = 'edge';
|
||||
|
||||
export async function GET(request: Request) {
|
||||
export async function GET(request: Request): Promise<ImageResponse> {
|
||||
const photos = await getPhotos('priority', MAX_PHOTOS_TO_SHOW_TEMPLATE);
|
||||
const {
|
||||
fontFamily,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user