Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Singh committed Nov 6, 2023
1 parent 97c0770 commit 2f02c56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions app/api/projects/[id]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}` }),
Expand All @@ -80,7 +80,6 @@ export async function PUT(
}
}


export async function DELETE(
request: NextRequest, // Assuming NextApiRequest is imported from 'next'
{ params }: { params: { id: string } }
Expand Down
1 change: 1 addition & 0 deletions app/create-project/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 ({
Expand Down

0 comments on commit 2f02c56

Please sign in to comment.