Skip to content

Commit 59f6998

Browse files
Update apps/dashboard/src/app/api/create-dashboard/route.ts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 579c723 commit 59f6998

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • apps/dashboard/src/app/api/create-dashboard

apps/dashboard/src/app/api/create-dashboard/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export async function POST(req: Request) {
1515
const projects = await user.listOwnedProjects();
1616
const project = projects.find((p: { id: string }) => p.id === payload.projectId);
1717
if (!project) {
18-
throwErr("You do not own this project");
18+
return Response.json({ error: "You do not own this project" }, { status: 403 });
1919
}
2020

2121
const runtimeCodegen = await generateDashboardRuntimeCodegen(payload.prompt);

0 commit comments

Comments
 (0)