fix(website): update route params type for Next.js 16

Next.js 15+ changed dynamic route params to Promise<...>.
Update GET and POST type signatures in blog comments route.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-05-28 22:20:14 +03:30
parent aa4612e06b
commit 1559ee95c7
@@ -4,9 +4,9 @@ const API_URL = process.env.MEEZI_API_URL ?? "http://localhost:5001";
export async function GET(
_req: NextRequest,
{ params }: { params: { slug: string } }
{ params }: { params: Promise<{ slug: string }> }
) {
const { slug } = await Promise.resolve(params);
const { slug } = await params;
try {
const res = await fetch(
@@ -31,9 +31,9 @@ export async function GET(
export async function POST(
req: NextRequest,
{ params }: { params: { slug: string } }
{ params }: { params: Promise<{ slug: string }> }
) {
const { slug } = await Promise.resolve(params);
const { slug } = await params;
let body: unknown;
try {