Revert ImageResponse endpoints to edge runtime

This commit is contained in:
Sam Becker 2023-11-19 00:37:33 -06:00
parent 7d45f44672
commit 4a2176b606
8 changed files with 16 additions and 0 deletions

View File

@ -10,6 +10,8 @@ import { FilmSimulation } from '@/simulation';
import { getIBMPlexMonoMedium } from '@/site/font';
import { ImageResponse } from 'next/og';
export const runtime = 'edge';
export async function GET(
_: Request,
context: { params: { simulation: FilmSimulation } },

View File

@ -8,6 +8,8 @@ import HomeImageResponse from '@/photo/image-response/HomeImageResponse';
import { getIBMPlexMonoMedium } from '@/site/font';
import { ImageResponse } from 'next/og';
export const runtime = 'edge';
export async function GET() {
const [
photos,

View File

@ -5,6 +5,8 @@ import PhotoImageResponse from '@/photo/image-response/PhotoImageResponse';
import { getIBMPlexMonoMedium } from '@/site/font';
import { ImageResponse } from 'next/og';
export const runtime = 'edge';
export async function GET(
_: Request,
context: { params: { photoId: string } },

View File

@ -9,6 +9,8 @@ import CameraImageResponse from '@/photo/image-response/CameraImageResponse';
import { getIBMPlexMonoMedium } from '@/site/font';
import { ImageResponse } from 'next/og';
export const runtime = 'edge';
export async function GET(
_: Request,
context: { params: { camera: string } },

View File

@ -8,6 +8,8 @@ import TagImageResponse from '@/photo/image-response/TagImageResponse';
import { getIBMPlexMonoMedium } from '@/site/font';
import { ImageResponse } from 'next/og';
export const runtime = 'edge';
export async function GET(
_: Request,
context: { params: { tag: string } },

View File

@ -9,6 +9,8 @@ import TemplateImageResponse from
import { getIBMPlexMonoMedium } from '@/site/font';
import { ImageResponse } from 'next/og';
export const runtime = 'edge';
export async function GET() {
const [
photos,

View File

@ -9,6 +9,8 @@ import TemplateImageResponse from
import { getIBMPlexMonoMedium } from '@/site/font';
import { ImageResponse } from 'next/og';
export const runtime = 'edge';
export async function GET() {
const [
photos,

View File

@ -6,6 +6,8 @@ import {
SITE_TITLE,
} from '@/site/config';
export const runtime = 'edge';
export async function GET() {
if (PUBLIC_API_ENABLED) {
const photos = await getPhotosCached({ limit: API_PHOTO_REQUEST_LIMIT });