diff --git a/app/api/link-preview/route.ts b/app/api/link-preview/route.ts index f66506c6b..5436a14d6 100644 --- a/app/api/link-preview/route.ts +++ b/app/api/link-preview/route.ts @@ -1,8 +1,6 @@ import { NextRequest, NextResponse } from 'next/server'; import { LinkPreviewService, InvalidUrlError } from '@/services/linkPreview.service'; -export const runtime = 'edge'; - // 24h CDN cache for full previews. 1h for host-only fallbacks (so a failing // upstream gets a retry chance sooner) and for invalid-URL errors (so a // caller spamming `?url=garbage` hits the CDN instead of re-invoking the diff --git a/app/api/og/route.tsx b/app/api/og/route.tsx index 10809fca2..3b90d9189 100644 --- a/app/api/og/route.tsx +++ b/app/api/og/route.tsx @@ -1,8 +1,6 @@ import { ImageResponse } from 'next/og'; import { NextRequest } from 'next/server'; -export const runtime = 'edge'; - export async function GET(request: NextRequest) { const { searchParams } = new URL(request.url); const title = searchParams.get('title'); @@ -11,140 +9,138 @@ export async function GET(request: NextRequest) { const type = searchParams.get('type') || 'article'; return new ImageResponse( - ( +
+ {/* Background pattern */} +
+ + {/* Logo and brand */}
- {/* Background pattern */} -
+
- {/* Logo and brand */} + {/* Content type badge */} + {type && (
- ResearchHub + {type}
+ )} - {/* Content type badge */} - {type && ( -
- {type} -
- )} - - {/* Title */} - {title && ( -

- {title} -

- )} + {/* Title */} + {title && ( +

+ {title} +

+ )} - {/* Description */} - {description && ( -

- {description} -

- )} + {/* Description */} + {description && ( +

+ {description} +

+ )} - {/* Author */} - {author && ( + {/* Author */} + {author && ( +
-
- {author.charAt(0).toUpperCase()} -
- By {author} + {author.charAt(0).toUpperCase()}
- )} -
- ), + By {author} +
+ )} +
, { width: 1200, height: 630, diff --git a/app/changelog/page.tsx b/app/changelog/page.tsx index f93263c57..82ae2bb91 100644 --- a/app/changelog/page.tsx +++ b/app/changelog/page.tsx @@ -2,6 +2,7 @@ import { PostService } from '@/services/post.service'; import { Work } from '@/types/work'; import { ChangelogEntry } from '@/components/changelog/ChangelogEntry'; import { notFound } from 'next/navigation'; +import { connection } from 'next/server'; import { buildOpenGraphMetadata } from '@/lib/metadata'; import { PageLayout } from '@/app/layouts/PageLayout'; import { CHANGELOG_POST_IDS } from '@/constants/changelog'; @@ -38,6 +39,8 @@ async function fetchPostWithContent(postId: string): Promise fetchPostWithContent(id)) ); diff --git a/app/moderators/editors/page.tsx b/app/moderators/editors/page.tsx index dd6e1ba37..094ba8a8c 100644 --- a/app/moderators/editors/page.tsx +++ b/app/moderators/editors/page.tsx @@ -1,7 +1,10 @@ +import { connection } from 'next/server'; import { UserService } from '@/services/user.service'; import EditorsDashboardContent from './components/EditorsDashboardContent'; export default async function EditorsPage() { + await connection(); // stop build-time prerender for this page + // Check if user has permissions for the PERMISSIONS_DASH application const hasPermissionsAccess = await UserService.gatekeeper('PERMISSIONS_DASH');