mirror of
https://github.com/yusufipk/OpenFrame.git
synced 2026-09-11 17:46:06 +00:00
refactor: Update response handling for comments and uploads to access nested data structure
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user