Revert ImageResponse endpoints to edge runtime
This commit is contained in:
parent
7d45f44672
commit
4a2176b606
@ -10,6 +10,8 @@ import { FilmSimulation } from '@/simulation';
|
|||||||
import { getIBMPlexMonoMedium } from '@/site/font';
|
import { getIBMPlexMonoMedium } from '@/site/font';
|
||||||
import { ImageResponse } from 'next/og';
|
import { ImageResponse } from 'next/og';
|
||||||
|
|
||||||
|
export const runtime = 'edge';
|
||||||
|
|
||||||
export async function GET(
|
export async function GET(
|
||||||
_: Request,
|
_: Request,
|
||||||
context: { params: { simulation: FilmSimulation } },
|
context: { params: { simulation: FilmSimulation } },
|
||||||
|
|||||||
@ -8,6 +8,8 @@ import HomeImageResponse from '@/photo/image-response/HomeImageResponse';
|
|||||||
import { getIBMPlexMonoMedium } from '@/site/font';
|
import { getIBMPlexMonoMedium } from '@/site/font';
|
||||||
import { ImageResponse } from 'next/og';
|
import { ImageResponse } from 'next/og';
|
||||||
|
|
||||||
|
export const runtime = 'edge';
|
||||||
|
|
||||||
export async function GET() {
|
export async function GET() {
|
||||||
const [
|
const [
|
||||||
photos,
|
photos,
|
||||||
|
|||||||
@ -5,6 +5,8 @@ import PhotoImageResponse from '@/photo/image-response/PhotoImageResponse';
|
|||||||
import { getIBMPlexMonoMedium } from '@/site/font';
|
import { getIBMPlexMonoMedium } from '@/site/font';
|
||||||
import { ImageResponse } from 'next/og';
|
import { ImageResponse } from 'next/og';
|
||||||
|
|
||||||
|
export const runtime = 'edge';
|
||||||
|
|
||||||
export async function GET(
|
export async function GET(
|
||||||
_: Request,
|
_: Request,
|
||||||
context: { params: { photoId: string } },
|
context: { params: { photoId: string } },
|
||||||
|
|||||||
@ -9,6 +9,8 @@ import CameraImageResponse from '@/photo/image-response/CameraImageResponse';
|
|||||||
import { getIBMPlexMonoMedium } from '@/site/font';
|
import { getIBMPlexMonoMedium } from '@/site/font';
|
||||||
import { ImageResponse } from 'next/og';
|
import { ImageResponse } from 'next/og';
|
||||||
|
|
||||||
|
export const runtime = 'edge';
|
||||||
|
|
||||||
export async function GET(
|
export async function GET(
|
||||||
_: Request,
|
_: Request,
|
||||||
context: { params: { camera: string } },
|
context: { params: { camera: string } },
|
||||||
|
|||||||
@ -8,6 +8,8 @@ import TagImageResponse from '@/photo/image-response/TagImageResponse';
|
|||||||
import { getIBMPlexMonoMedium } from '@/site/font';
|
import { getIBMPlexMonoMedium } from '@/site/font';
|
||||||
import { ImageResponse } from 'next/og';
|
import { ImageResponse } from 'next/og';
|
||||||
|
|
||||||
|
export const runtime = 'edge';
|
||||||
|
|
||||||
export async function GET(
|
export async function GET(
|
||||||
_: Request,
|
_: Request,
|
||||||
context: { params: { tag: string } },
|
context: { params: { tag: string } },
|
||||||
|
|||||||
@ -9,6 +9,8 @@ import TemplateImageResponse from
|
|||||||
import { getIBMPlexMonoMedium } from '@/site/font';
|
import { getIBMPlexMonoMedium } from '@/site/font';
|
||||||
import { ImageResponse } from 'next/og';
|
import { ImageResponse } from 'next/og';
|
||||||
|
|
||||||
|
export const runtime = 'edge';
|
||||||
|
|
||||||
export async function GET() {
|
export async function GET() {
|
||||||
const [
|
const [
|
||||||
photos,
|
photos,
|
||||||
|
|||||||
@ -9,6 +9,8 @@ import TemplateImageResponse from
|
|||||||
import { getIBMPlexMonoMedium } from '@/site/font';
|
import { getIBMPlexMonoMedium } from '@/site/font';
|
||||||
import { ImageResponse } from 'next/og';
|
import { ImageResponse } from 'next/og';
|
||||||
|
|
||||||
|
export const runtime = 'edge';
|
||||||
|
|
||||||
export async function GET() {
|
export async function GET() {
|
||||||
const [
|
const [
|
||||||
photos,
|
photos,
|
||||||
|
|||||||
@ -6,6 +6,8 @@ import {
|
|||||||
SITE_TITLE,
|
SITE_TITLE,
|
||||||
} from '@/site/config';
|
} from '@/site/config';
|
||||||
|
|
||||||
|
export const runtime = 'edge';
|
||||||
|
|
||||||
export async function GET() {
|
export async function GET() {
|
||||||
if (PUBLIC_API_ENABLED) {
|
if (PUBLIC_API_ENABLED) {
|
||||||
const photos = await getPhotosCached({ limit: API_PHOTO_REQUEST_LIMIT });
|
const photos = await getPhotosCached({ limit: API_PHOTO_REQUEST_LIMIT });
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user