refactor: Update response handling for comments and uploads to access nested data structure

This commit is contained in:
Yusuf İpek
2026-02-07 18:17:46 +03:00
parent f6044f3c24
commit 42839d4d69
3 changed files with 29 additions and 18 deletions
@@ -1,4 +1,5 @@
import { NextRequest } from 'next/server';
import { revalidatePath } from 'next/cache';
import { db } from '@/lib/db';
import { auth } from '@/lib/auth';
import { ProjectMemberRole } from '@prisma/client';
@@ -165,6 +166,8 @@ export async function DELETE(request: NextRequest, { params }: RouteParams) {
await db.video.delete({ where: { id: videoId } });
revalidatePath(`/projects/${projectId}`);
const response = successResponse({ message: 'Video deleted' });
return withCacheControl(response, 'private, no-store');
} catch (error) {