This commit is contained in:
@@ -4,11 +4,11 @@ import prisma from '../../../../../lib/prisma'
|
||||
// PATCH /api/conversations/[id]/archive — Toggle archive status for the user
|
||||
export async function PATCH(
|
||||
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 { archived } = await request.json()
|
||||
|
||||
if (!userId) {
|
||||
|
||||
Reference in New Issue
Block a user