diff --git a/app/api/projects/[id]/route.ts b/app/api/projects/[id]/route.ts index b5d6d66..0d7ff92 100644 --- a/app/api/projects/[id]/route.ts +++ b/app/api/projects/[id]/route.ts @@ -68,7 +68,7 @@ export async function PUT( headers: { 'Content-Type': 'application/json' }, status: 200, // OK }); - } catch (error) { + } catch (error: any) { console.error(error); // Log the actual error to the server logs return new Response( JSON.stringify({ error: `Failed to update project: ${error.message}` }), @@ -80,7 +80,6 @@ export async function PUT( } } - export async function DELETE( request: NextRequest, // Assuming NextApiRequest is imported from 'next' { params }: { params: { id: string } } diff --git a/app/create-project/page.tsx b/app/create-project/page.tsx index b3db3f5..5593948 100644 --- a/app/create-project/page.tsx +++ b/app/create-project/page.tsx @@ -4,6 +4,7 @@ import User from '@/models/user.model'; import CreateProjectComponent from './CreateProjectComponent'; import { toPlainObject } from '../utils/methods'; import Project, { ProjectDocument } from '@/models/project.model'; + export const dynamic = 'force-dynamic'; const CreateProject = async ({