Temporarily stop using auth in og images
This commit is contained in:
parent
caeccd1461
commit
ad4d35531d
@ -1,5 +1,6 @@
|
||||
import { auth } from '@/auth';
|
||||
import { getImageCacheHeadersForAuth, getPhotoCached } from '@/cache';
|
||||
// import { auth } from '@/auth';
|
||||
// import { getImageCacheHeadersForAuth, getPhotoCached } from '@/cache';
|
||||
import { getPhotoCached } from '@/cache';
|
||||
import { IMAGE_OG_DIMENSION } from '@/photo/image-response';
|
||||
import PhotoImageResponse from '@/photo/image-response/PhotoImageResponse';
|
||||
import { getIBMPlexMonoMedium } from '@/site/font';
|
||||
@ -14,11 +15,11 @@ export async function GET(
|
||||
const [
|
||||
photo,
|
||||
{ fontFamily, fonts },
|
||||
headers,
|
||||
// headers,
|
||||
] = await Promise.all([
|
||||
getPhotoCached(context.params.photoId),
|
||||
getIBMPlexMonoMedium(),
|
||||
getImageCacheHeadersForAuth(await auth()),
|
||||
// getImageCacheHeadersForAuth(await auth()),
|
||||
]);
|
||||
|
||||
if (!photo) { return new Response('Photo not found', { status: 404 }); }
|
||||
@ -27,6 +28,6 @@ export async function GET(
|
||||
|
||||
return new ImageResponse(
|
||||
<PhotoImageResponse {...{ photo, width, height, fontFamily }} />,
|
||||
{ width, height, fonts, headers },
|
||||
{ width, height, fonts },
|
||||
);
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import {
|
||||
GENERATE_STATIC_PARAMS_LIMIT,
|
||||
// GENERATE_STATIC_PARAMS_LIMIT,
|
||||
GRID_THUMBNAILS_TO_SHOW_MAX,
|
||||
descriptionForPhoto,
|
||||
titleForPhoto,
|
||||
@ -16,7 +16,7 @@ import { getPhotoCached, getPhotosNearIdCached } from '@/cache';
|
||||
import { getPhotoIds } from '@/services/vercel-postgres';
|
||||
|
||||
export async function generateStaticParams() {
|
||||
const photos = await getPhotoIds({ limit: GENERATE_STATIC_PARAMS_LIMIT });
|
||||
const photos = await getPhotoIds({ limit: 10 });
|
||||
return photos.map(id => ({ photoId: id }));
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user