Use explicit context object for route handler
Some checks failed
Build and Push App / build (push) Failing after 22s
Some checks failed
Build and Push App / build (push) Failing after 22s
This commit is contained in:
@@ -4,10 +4,10 @@ import prisma from '../../../../../lib/prisma';
|
||||
|
||||
export async function POST(
|
||||
request: NextRequest,
|
||||
{ params }: { params: Promise<{ id: string }> }
|
||||
) {
|
||||
context: { params: Promise<{ id: string }> }
|
||||
): Promise<Response> {
|
||||
try {
|
||||
const { id } = await params;
|
||||
const { id } = await context.params;
|
||||
|
||||
if (!id) {
|
||||
return NextResponse.json({ error: 'ID requis' }, { status: 400 });
|
||||
|
||||
Reference in New Issue
Block a user