This commit is contained in:
@@ -4,11 +4,11 @@ import prisma from '../../../../../lib/prisma'
|
||||
// POST /api/messages/[id]/report — Report a message for moderation
|
||||
export async function POST(
|
||||
request: NextRequest,
|
||||
{ params }: { params: Promise<{ id: string }> }
|
||||
) {
|
||||
context: { params: Promise<{ id: string }> }
|
||||
): Promise<Response> {
|
||||
try {
|
||||
const userId = request.headers.get('x-user-id')
|
||||
const { id } = await params
|
||||
const { id } = await context.params
|
||||
const { reason } = await request.json()
|
||||
|
||||
if (!userId) {
|
||||
|
||||
Reference in New Issue
Block a user